forked from pointfreeco/swift-snapshot-testing
-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (84 loc) · 2.43 KB
/
ci.yml
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: CI
on:
push:
jobs:
macos:
strategy:
matrix:
xcode:
- "14.3.1"
name: macOS 13 (Xcode ${{ matrix.xcode }})
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- name: Select Xcode ${{ matrix.xcode }}
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
- name: Run tests
id: run-tests
run: make test-macos
- name: Zip XCResult
id: zip-xcresult
if: failure() && steps.run-tests.conclusion == 'failure'
run: cd .xcresults; zip -r xcresult-macos.zip macos.xcresult
- name: Upload XCResult
if: failure() && steps.zip-xcresult.conclusion == 'success'
uses: actions/upload-artifact@v4
with:
name: xcresult-macos.zip
path: .xcresults/xcresult-macos.zip
ios:
strategy:
matrix:
xcode:
- "14.3.1"
name: iOS 16.4 (Xcode ${{ matrix.xcode }})
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- name: Select Xcode ${{ matrix.xcode }}
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
- name: Run tests
id: run-tests
run: make test-ios
- name: Zip XCResult
id: zip-xcresult
if: failure() && steps.run-tests.conclusion == 'failure'
run: cd .xcresults; zip -r xcresult-ios.zip ios.xcresult
- name: Upload XCResult
if: failure() && steps.zip-xcresult.conclusion == 'success'
uses: actions/upload-artifact@v4
with:
name: xcresult-ios.zip
path: .xcresults/xcresult-ios.zip
ubuntu:
strategy:
matrix:
swift:
- "5.7"
name: Ubuntu (Swift ${{ matrix.swift }})
runs-on: ubuntu-20.04
steps:
- uses: swift-actions/setup-swift@v2
with:
swift-version: ${{ matrix.swift }}
- uses: actions/checkout@v4
- run: swift test
windows:
strategy:
matrix:
swift:
- "5.8"
name: Windows (Swift ${{ matrix.swift }})
runs-on: windows-2019
steps:
- uses: compnerd/gha-setup-swift@main
with:
branch: swift-${{ matrix.swift }}-release
tag: ${{ matrix.swift }}-RELEASE
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- uses: actions/checkout@v4
- run: swift build
- run: swift test