diff options
author | cyqsimon <28627918+cyqsimon@users.noreply.github.com> | 2023-10-07 23:43:19 +0800 |
---|---|---|
committer | cyqsimon <28627918+cyqsimon@users.noreply.github.com> | 2023-10-07 23:43:19 +0800 |
commit | 53f6feae17c2cf1e950af114b18ea984475d38ca (patch) | |
tree | 32232b4e3d72c0dfee7f989c10883be3b7835732 /.github | |
parent | 4d1f62b46abcdd067688846a5a06ac6512032209 (diff) |
CI: upload failed test snapshots
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/ci.yaml | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index fe29060..9f64ab2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -80,11 +80,19 @@ jobs: & "$env:TEMP/npcap-oem.exe" /S - name: Run tests + id: run_tests # npcap is needed to run tests on Windows, so this is an unfortunate # sacrifice we have to make in the name of security if: (matrix.os != 'windows-latest') || (github.event_name != 'pull_request') run: cargo test --verbose + - name: Upload snapshots of failed tests + if: ${{ steps.run_tests.outcome == 'failure' }} + uses: actions/upload-artifact@v3 + with: + name: ${{ matrix.os }}-${{ matrix.rust }}-failed_snapshots + path: src/tests/cases/snapshots/*.snap.new + - name: Upload unix binary if: matrix.os != 'windows-latest' uses: actions/upload-artifact@v3 |