Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |