File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Regression Test
2+
3+ on :
4+ push :
5+
6+ jobs :
7+ run_all_tests :
8+ runs-on : ubuntu-latest
9+ # if: "!contains(github.event.pull_request.title, '[NO-REGRESSION-TEST]')"
10+ steps :
11+ - name : Checkout pull request code
12+ uses : actions/checkout@v4
13+ with :
14+ path : ' pr_repo'
15+
16+ - name : Checkout main branch code
17+ uses : actions/checkout@v4
18+ with :
19+ ref : ' main'
20+ path : ' main_repo'
21+
22+ - name : Setup Go environment
23+ uses : actions/setup-go@v5
24+ with :
25+ go-version : ' 1.22'
26+
27+ - name : Compile both binaries
28+ run : |
29+ (cd main_repo && go build -o ../abcoder_old)
30+ (cd pr_repo && go build -o ../abcoder_new)
31+
32+ - name : Run test scripts and generate outputs
33+ 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+
37+ - name : Compare outputs and check for regression
38+ id : diff_check
39+ run : ./pr_repo/script/diffjson.py out_old out_new
40+ continue-on-error : true
41+
42+ - name : Upload output directories
43+ uses : actions/upload-artifact@v4
44+ if : always()
45+ with :
46+ name : regression-outputs
47+ path : |
48+ out_old
49+ out_new
50+ retention-days : 3
You can’t perform that action at this time.
0 commit comments