Skip to content

Commit

Permalink
feat: Testsuite Preview github action
Browse files Browse the repository at this point in the history
Signed-off-by: George Cosma <[email protected]>
  • Loading branch information
george-cosma committed Feb 8, 2025
1 parent f3cf3dc commit f8aa4b3
Show file tree
Hide file tree
Showing 7 changed files with 641 additions and 149 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/testsuite_preview.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Testsuite Preview

on:
pull_request:

permissions:
pull-requests: write

jobs:
ts_preview:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
env:
RUSTFLAGS: "-D warnings"
RUSTDOCFLAGS: "-D warnings"

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: main
submodules: true

- name: Generate old report
run: |
TESTSUITE_SAVE=1 cargo test -- spec_tests --show-output
cp testsuite_results.json old.json
- name: Switch
run: |
cargo clean
rm -f Cargo.lock
git checkout ${{ github.event.pull_request.head.sha }}
- name: Generate new report
run: |
TESTSUITE_SAVE=1 cargo test -- spec_tests --show-output
cp testsuite_results.json new.json
- name: Compare reports
run: python3 ./ci_tools/compare_testsuite.py old.json new.json > testsuite_report.md

- name: Sticky Pull Request Comment
uses: marocchino/[email protected]
with:
header: testsuite
path: testsuite_report.md
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
/target
result
whitepaper/main.pdf
testsuite_results.json
Loading

0 comments on commit f8aa4b3

Please sign in to comment.