@@ -2,38 +2,60 @@ name: Regression Test
22
33on :
44 push :
5+ branches :
6+ - main
7+ pull_request :
8+ branches :
9+ - main
510
611jobs :
712 run_all_tests :
813 runs-on : ubuntu-latest
914 # if: "!contains(github.event.pull_request.title, '[NO-REGRESSION-TEST]')"
1015 steps :
16+ - name : Setup Go environment
17+ uses : actions/setup-go@v5
18+ with :
19+ go-version : ' 1.22'
20+
21+ - name : Setup Rust toolchain
22+ uses : dtolnay/rust-toolchain@stable
23+ with :
24+ toolchain : stable
25+ components : rust-analyzer
26+
27+ - name : Setup Python environment
28+ uses : actions/setup-python@v5
29+ with :
30+ python-version : ' 3.11'
31+
1132 - name : Checkout pull request code
1233 uses : actions/checkout@v4
1334 with :
1435 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
1542
1643 - name : Checkout main branch code
1744 uses : actions/checkout@v4
1845 with :
1946 ref : ' main'
2047 path : ' main_repo'
2148
22- - name : Setup Go environment
23- uses : actions/setup-go@v5
24- with :
25- go-version : ' 1.22'
26-
2749 - name : Compile both binaries
2850 run : |
2951 (cd main_repo && go build -o ../abcoder_old)
3052 (cd pr_repo && go build -o ../abcoder_new)
31-
53+
3254 - name : Run test scripts and generate outputs
3355 run : |
34- OUTDIR=out_old ABCEXE=./abcoder_old ./pr_repo/script/run_all_testdata.sh
35- OUTDIR=out_new ABCEXE=./abcoder_new ./pr_repo/script/run_all_testdata.sh
36-
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
58+
3759 - name : Compare outputs and check for regression
3860 id : diff_check
3961 run : ./pr_repo/script/diffjson.py out_old out_new
0 commit comments