-
Notifications
You must be signed in to change notification settings - Fork 2
67 lines (55 loc) · 1.57 KB
/
pr-tests.yml
File metadata and controls
67 lines (55 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: PR Tests
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
jobs:
core-tests:
runs-on: macos-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Select latest stable Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "16.4"
- name: Install xcsift
run: brew install xcsift
- name: Run tests
run: |
set -o pipefail
swift test --skip TextDiffSnapshotTests 2>&1 | xcsift --warnings
snapshot-tests:
runs-on: macos-latest
timeout-minutes: 20
env:
SNAPSHOT_ARTIFACTS: ${{ github.workspace }}/snapshot-artifacts
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Select latest stable Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "16.4"
- name: Install xcsift
run: brew install xcsift
- name: Run snapshot tests
run: |
set -o pipefail
mkdir -p "$SNAPSHOT_ARTIFACTS"
swift test --filter TextDiffSnapshotTests 2>&1 | tee "$SNAPSHOT_ARTIFACTS/swift-test.log" | xcsift --warnings
- name: Collect snapshot artifact bundle
if: always()
run: swift Scripts/collect_snapshot_artifacts.swift
- name: Upload snapshot artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: snapshot-artifacts
path: ${{ env.SNAPSHOT_ARTIFACTS }}
if-no-files-found: warn
retention-days: 7