-
-
Notifications
You must be signed in to change notification settings - Fork 74
51 lines (47 loc) · 1.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
name: CI
on:
push:
branches:
- main
pull_request: {}
merge_group: {}
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
compile:
name: Compile (Swift ${{ matrix.swift_version }}) (${{ matrix.platform }})
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-latest]
swift_version: [5.7, 5.8, 5.9]
steps:
- uses: swift-actions/setup-swift@61a116f4030ac34fb5731aab0eff5a0aed94ba29
with:
swift-version: ${{ matrix.swift_version }}
- uses: actions/checkout@v4
- run: swift build --disable-sandbox --configuration release
test:
name: Test (${{ matrix.platform}})
runs-on: ${{ matrix.platform }}
strategy:
matrix:
platform: [macos-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v4
- name: Install Swift and Tools
if: matrix.platform == 'ubuntu-latest'
uses: swift-actions/setup-swift@cdbe0f7f4c77929b6580e71983e8606e55ffe7e4
with:
swift-version: 5.9.2
- run: swift test --enable-code-coverage
- name: Prepare Code Coverage
run: ./tools/export_coverage
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
files: info.lcov
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}