-
Notifications
You must be signed in to change notification settings - Fork 12
93 lines (81 loc) · 2.2 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
name: CI
on:
push:
branches:
- master
paths-ignore:
- '.gitignore'
- '.spi.yml'
- 'CODE_OF_CONDUCT.md'
- 'LICENSE'
- 'README.md'
pull_request:
branches-ignore:
- 'bugfix/**'
- 'feature/**'
- 'topic/**'
paths-ignore:
- '.gitignore'
- '.spi.yml'
- 'CODE_OF_CONDUCT.md'
- 'LICENSE'
- 'README.md'
workflow_dispatch:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint
runs-on: macos-13
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Lint Swift Code
run: swiftlint lint --strict --reporter github-actions-logging
- name: Lint Bash Code
uses: ludeeus/action-shellcheck@master
with:
scandir: './Scripts'
ignore_paths: Templates
version: v0.10.0
env:
SHELLCHECK_OPTS: -e SC1009 -e SC1072 -e SC1073 -e SC1090 -e SC1091
tests:
name: Tests (Xcode ${{ matrix.xcode }}${{ matrix.upload_coverage && ', Upload Coverage Report' || '' }})
needs: [lint]
runs-on: macos-${{ matrix.macos }}
env:
DEVELOPER_DIR: "/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer"
strategy:
matrix:
include:
- macos: 13
xcode: '14.2' # Swift 5.7
upload_coverage: false
- macos: 14
xcode: '14.3.1' # Swift 5.8
upload_coverage: false
- macos: 14
xcode: '15.2' # Swift 5.9
upload_coverage: false
- macos: 14
xcode: '15.4' # Swift 5.10
upload_coverage: true
steps:
- name: Runner Overview
run: system_profiler SPHardwareDataType SPSoftwareDataType SPDeveloperToolsDataType
- name: Checkout
uses: actions/checkout@v4
- name: Upgrade Bash
run: make bash
- name: Run Tests
run: make tests
- name: Upload Code Coverage Report
if: ${{ matrix.upload_coverage }}
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./.coverage/
fail_ci_if_error: true
verbose: true