Skip to content

Commit bbbe2a1

Browse files
committed
ci: upload snapshot artifacts from github runs
1 parent c439b67 commit bbbe2a1

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

.github/workflows/pr-tests.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ jobs:
3434
runs-on: macos-latest
3535
timeout-minutes: 20
3636
continue-on-error: true
37+
env:
38+
SNAPSHOT_ARTIFACTS: ${{ github.workspace }}/.snapshot-artifacts
3739
steps:
3840
- name: Checkout
3941
uses: actions/checkout@v4
@@ -49,4 +51,14 @@ jobs:
4951
- name: Run snapshot tests
5052
run: |
5153
set -o pipefail
52-
swift test --filter TextDiffSnapshotTests 2>&1 | xcsift --warnings
54+
mkdir -p "$SNAPSHOT_ARTIFACTS"
55+
swift test --filter TextDiffSnapshotTests 2>&1 | tee "$SNAPSHOT_ARTIFACTS/swift-test.log" | xcsift --warnings
56+
57+
- name: Upload snapshot artifacts
58+
if: always()
59+
uses: actions/upload-artifact@v4
60+
with:
61+
name: snapshot-artifacts
62+
path: ${{ env.SNAPSHOT_ARTIFACTS }}
63+
if-no-files-found: warn
64+
retention-days: 7

0 commit comments

Comments
 (0)