-
Notifications
You must be signed in to change notification settings - Fork 55
50 lines (42 loc) · 1.33 KB
/
regression.yml
File metadata and controls
50 lines (42 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Consolidated Regression Test
on:
push:
jobs:
run_all_tests:
runs-on: ubuntu-latest
#if: "!contains(github.event.pull_request.title, '[NO-REGRESSION-TEST]')"
steps:
- name: Checkout pull request code
uses: actions/checkout@v4
with:
path: 'pr_repo'
- name: Checkout main branch code
uses: actions/checkout@v4
with:
ref: 'main'
path: 'main_repo'
- name: Setup Go environment
uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Compile both binaries
run: |
go build -o pr_repo/abcoder_new pr_repo
go build -o main_repo/abcoder_old main_repo
- name: Run test scripts and generate outputs
run: |
OUT=out_old ABCEXE=./main_repo/abcoder_old ./pr_repo/script/run_all_testdata.sh
OUT=out_new ABCEXE=./pr_repo/abcoder_new ./pr_repo/script/run_all_testdata.sh
- name: Compare outputs and check for regression
id: diff_check
run: ./pr_repo/script/diffjson.py out_old out_new
continue-on-error: true
- name: Upload output directories
uses: actions/upload-artifact@v4
if: always()
with:
name: regression-outputs
path: |
out_old
out_new
retention-days: 3