-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (39 loc) · 1 KB
/
tests.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
name: Tests
on:
workflow_call:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
types:
- opened
- reopened
- ready_for_review
jobs:
unit_tests:
name: Run Tests
runs-on: macos-12
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache dependencies
uses: actions/cache@v3
with:
path: .build
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-
- name: Build and test
uses: mxcl/xcodebuild@v1
with:
xcode: ^14
platform: iOS
code-coverage: true
- name: Convert coverage
uses: sersoft-gmbh/swift-coverage-action@v3
id: coverage-files
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ${{ join(fromJSON(steps.coverage-files.outputs.files), ',') }}