Skip to content

Commit 40f16b5

Browse files
committed
ci: add standalone Java E2E workflow for isolated testing
1 parent cb87763 commit 40f16b5

1 file changed

Lines changed: 77 additions & 0 deletions

File tree

.github/workflows/java-e2e.yaml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Java E2E Tests
2+
on:
3+
workflow_dispatch:
4+
5+
jobs:
6+
e2e-java:
7+
strategy:
8+
fail-fast: false
9+
matrix:
10+
include:
11+
- name: java-fibonacci-nogit
12+
script: end_to_end_test_java_fibonacci.py
13+
expected_improvement: 70
14+
remove_git: true
15+
- name: java-tracer
16+
script: end_to_end_test_java_tracer.py
17+
expected_improvement: 10
18+
- name: java-void-optimization-nogit
19+
script: end_to_end_test_java_void_optimization.py
20+
expected_improvement: 70
21+
remove_git: true
22+
runs-on: ubuntu-latest
23+
env:
24+
CODEFLASH_AIS_SERVER: prod
25+
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
26+
CODEFLASH_API_KEY: ${{ secrets.CODEFLASH_API_KEY }}
27+
COLUMNS: 110
28+
MAX_RETRIES: 3
29+
RETRY_DELAY: 5
30+
EXPECTED_IMPROVEMENT_PCT: ${{ matrix.expected_improvement }}
31+
CODEFLASH_END_TO_END: 1
32+
CODEFLASH_LOOPING_TIME: 5
33+
steps:
34+
- uses: actions/checkout@v6
35+
36+
- name: Set up JDK 11
37+
uses: actions/setup-java@v5
38+
with:
39+
java-version: '11'
40+
distribution: 'temurin'
41+
cache: maven
42+
43+
- name: Install uv
44+
uses: astral-sh/setup-uv@v8.0.0
45+
with:
46+
python-version: 3.11.6
47+
enable-cache: true
48+
49+
- name: Install dependencies
50+
run: uv sync
51+
52+
- name: Cache codeflash-runtime JAR
53+
id: runtime-jar-cache
54+
uses: actions/cache@v4
55+
with:
56+
path: ~/.m2/repository/io/codeflash
57+
key: codeflash-runtime-${{ hashFiles('codeflash-java-runtime/pom.xml', 'codeflash-java-runtime/src/**') }}
58+
59+
- name: Build and install codeflash-runtime JAR
60+
if: steps.runtime-jar-cache.outputs.cache-hit != 'true'
61+
run: |
62+
cd codeflash-java-runtime
63+
mvn install -q -DskipTests
64+
65+
- name: Remove .git
66+
if: matrix.remove_git
67+
run: |
68+
if [ -d ".git" ]; then
69+
sudo rm -rf .git
70+
echo ".git directory removed."
71+
else
72+
echo ".git directory does not exist."
73+
exit 1
74+
fi
75+
76+
- name: Run E2E test
77+
run: uv run python tests/scripts/${{ matrix.script }}

0 commit comments

Comments
 (0)