1212 run_all_tests :
1313 runs-on : ubuntu-latest
1414 # if: "!contains(github.event.pull_request.title, '[NO-REGRESSION-TEST]')"
15+ env :
16+ LANGS : " go rust python java"
1517 steps :
1618 - name : Setup Go environment
1719 uses : actions/setup-go@v5
@@ -29,16 +31,16 @@ jobs:
2931 with :
3032 python-version : ' 3.11'
3133
34+ - name : Setup JDK 21
35+ uses : actions/setup-java@v4
36+ with :
37+ java-version : ' 21'
38+ distribution : ' temurin'
39+
3240 - name : Checkout pull request code
3341 uses : actions/checkout@v4
3442 with :
3543 path : ' pr_repo'
36- submodules : true
37-
38- - name : Install Python dependencies
39- run : |
40- pip install -r ./pr_repo/script/requirements.txt
41- pip install ./pr_repo/pylsp
4244
4345 - name : Checkout main branch code
4446 uses : actions/checkout@v4
@@ -51,14 +53,26 @@ jobs:
5153 (cd main_repo && go build -o ../abcoder_old)
5254 (cd pr_repo && go build -o ../abcoder_new)
5355
54- - name : Run test scripts and generate outputs
56+ - name : Install evaluation dependencies
57+ run : pip install -r ./pr_repo/script/requirements.txt
58+
59+ - name : Install LSPs
5560 run : |
56- LANGS="go rust python" OUTDIR=out_old ABCEXE=./abcoder_old ./pr_repo/script/run_all_testdata.sh
57- LANGS="go rust python" OUTDIR=out_new ABCEXE=./abcoder_new ./pr_repo/script/run_all_testdata.sh
61+ OUTDIR=out_new ABCEXE=./abcoder_new ./pr_repo/script/run_testdata.sh first
62+ # use the same JDTLS for consistency and to avoid wasting time installing a duplicate JDTLS
63+ echo "JDTLS_ROOT_PATH=$(realpath ./pr_repo/lang/java/lsp/jdtls/jdt-language-server-*)" >> $GITHUB_ENV
64+
65+ - name : Run OLD abcoder
66+ run :
67+ OUTDIR=out_old ABCEXE=./abcoder_old ./pr_repo/script/run_testdata.sh all
68+
69+ - name : Run NEW abcoder
70+ run :
71+ OUTDIR=out_new ABCEXE=./abcoder_new ./pr_repo/script/run_testdata.sh all
5872
5973 - name : Compare outputs and check for regression
6074 id : diff_check
61- run : ./pr_repo/script/diffjson.py out_old out_new
75+ run : ./pr_repo/script/diffjson.py out_old out_new || echo "failed=true" >> $GITHUB_OUTPUT
6276 continue-on-error : true
6377
6478 - name : Upload output directories
7084 out_old
7185 out_new
7286 retention-days : 3
87+
88+ - name : Status check
89+ if : steps.diff_check.outputs.failed == 'true'
90+ run : exit 1
0 commit comments