-
-
Notifications
You must be signed in to change notification settings - Fork 2
62 lines (58 loc) · 2.23 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
name: ci
on:
push:
branches: [ main ]
pull_request:
branches: '*'
merge_group:
branches: [ main ]
env:
CI_XCODE_LATEST: '/Applications/Xcode_16.1.app/Contents/Developer'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
timeout-minutes: 15
runs-on: macos-15
strategy:
matrix:
destination: ['platform=iOS\ Simulator,OS=18.1,name=iPhone\ 16\ Pro\ Max', 'platform=watchOS\ Simulator,name=Apple\ Watch\ Series\ 10\ \(46mm\)', 'platform=macOS CODE_SIGN_IDENTITY=""', 'platform=visionOS\ Simulator,OS=2.1,name=Apple\ Vision\ Pro CODE_SIGN_IDENTITY=""']
action: ['test', 'build']
exclude:
- destination: 'platform=iOS\ Simulator,OS=18.1,name=iPhone\ 16\ Pro\ Max'
action: 'build'
- destination: 'platform=macOS CODE_SIGN_IDENTITY=""'
action: 'build'
- destination: 'platform=visionOS\ Simulator,OS=2.1,name=Apple\ Vision\ Pro CODE_SIGN_IDENTITY=""'
action: 'test'
- destination: 'platform=watchOS\ Simulator,name=Apple\ Watch\ Series\ 10\ \(46mm\)'
action: 'test'
steps:
- uses: actions/checkout@v4
- name: Install Swiftlint
run: brew install swiftlint
- name: Build-Test
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -scheme CareKitEssentials -derivedDataPath DerivedData -destination ${{ matrix.destination }} ${{ matrix.action }} 2>&1 | xcbeautify --renderer github-actions
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_LATEST }}
- name: Upload codecov yml
run: |
cat .codecov.yml | curl --data-binary @- https://codecov.io/validate
- name: Prepare codecov
uses: sersoft-gmbh/swift-coverage-action@v4
id: coverage-files
with:
format: lcov
search-paths: ./DerivedData
ignore-conversion-failures: true
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_LATEST }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
files: ${{join(fromJSON(steps.coverage-files.outputs.files), ',')}}
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_LATEST }}