-
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (55 loc) · 2.03 KB
/
test.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
name: test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
test:
continue-on-error: true
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
swift: [
"5.3",
"5.4",
"5.5",
"5.6",
"5",
]
runs-on: ${{ matrix.os }}
steps:
- name: Add Status Check | Swift v${{ matrix.swift }} on ${{ matrix.os }} / unit tests
uses: Sibz/github-status-action@v1
with:
authToken: ${{secrets.GITHUB_TOKEN}}
context: 'Swift v${{ matrix.swift }} on ${{ matrix.os }} / unit tests'
description: 'Running unit tests with Swift v${{ matrix.swift }} on ${{ matrix.os }}'
state: 'pending'
sha: ${{github.event.pull_request.head.sha || github.sha}}
- uses: actions/checkout@v3
- name: Setup Swift @ ${{ matrix.swift}}
uses: swift-actions/setup-swift@v1
with:
swift-version: ${{ matrix.swift }}
- name: Run tests
run: swift test -v
- name: Status Check Success | Swift v${{ matrix.swift }} on ${{ matrix.os }} / unit tests
if: ${{ success() }}
uses: Sibz/github-status-action@v1
with:
authToken: ${{secrets.GITHUB_TOKEN}}
context: 'Swift v${{ matrix.swift }} on ${{ matrix.os }} / unit tests'
description: 'Unit tests with Swift v${{ matrix.swift }} on ${{ matrix.os }} succeeded'
state: 'success'
sha: ${{github.event.pull_request.head.sha || github.sha}}
- name: Status Check Failure | Swift v${{ matrix.swift }} on ${{ matrix.os }} / unit tests
if: ${{ failure() }}
uses: Sibz/github-status-action@v1
with:
authToken: ${{secrets.GITHUB_TOKEN}}
context: 'Swift v${{ matrix.swift }} on ${{ matrix.os }} / unit tests'
description: 'Unit tests with Swift v${{ matrix.swift }} on ${{ matrix.os }} failed'
state: 'failure'
sha: ${{github.event.pull_request.head.sha || github.sha}}