|
8 | 8 | runs-on: ubuntu-latest |
9 | 9 | #if: "!contains(github.event.pull_request.title, '[NO-REGRESSION-TEST]')" |
10 | 10 | steps: |
| 11 | + - name: Setup Go environment |
| 12 | + uses: actions/setup-go@v5 |
| 13 | + with: |
| 14 | + go-version: '1.22' |
| 15 | + |
| 16 | + - name: Setup Rust toolchain |
| 17 | + uses: dtolnay/rust-toolchain@stable |
| 18 | + with: |
| 19 | + toolchain: stable |
| 20 | + components: rust-analyzer |
| 21 | + |
| 22 | + - name: Setup Python environment |
| 23 | + uses: actions/setup-python@v5 |
| 24 | + with: |
| 25 | + python-version: '3.11' |
| 26 | + |
11 | 27 | - name: Checkout pull request code |
12 | 28 | uses: actions/checkout@v4 |
13 | 29 | with: |
14 | 30 | path: 'pr_repo' |
| 31 | + submodules: true |
| 32 | + |
| 33 | + - name: Install Python dependencies |
| 34 | + run: | |
| 35 | + pip install -r ./pr_repo/script/requirements.txt |
| 36 | + pip install ./pr_repo/pylsp |
15 | 37 |
|
16 | 38 | - name: Checkout main branch code |
17 | 39 | uses: actions/checkout@v4 |
18 | 40 | with: |
19 | 41 | ref: 'main' |
20 | 42 | path: 'main_repo' |
21 | 43 |
|
22 | | - - name: Setup Go environment |
23 | | - uses: actions/setup-go@v5 |
24 | | - with: |
25 | | - go-version: '1.22' |
26 | | - |
27 | 44 | - name: Compile both binaries |
28 | 45 | run: | |
29 | 46 | (cd main_repo && go build -o ../abcoder_old) |
30 | 47 | (cd pr_repo && go build -o ../abcoder_new) |
31 | | - |
| 48 | +
|
32 | 49 | - name: Run test scripts and generate outputs |
33 | 50 | 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 | | - |
| 51 | + LANGS="go rust python" OUTDIR=out_old ABCEXE=./abcoder_old ./pr_repo/script/run_all_testdata.sh |
| 52 | + LANGS="go rust python" OUTDIR=out_new ABCEXE=./abcoder_new ./pr_repo/script/run_all_testdata.sh |
| 53 | +
|
37 | 54 | - name: Compare outputs and check for regression |
38 | 55 | id: diff_check |
39 | 56 | run: ./pr_repo/script/diffjson.py out_old out_new |
|
0 commit comments