-
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (37 loc) · 1.04 KB
/
build-and-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
name: Build and test
on:
push:
pull_request:
branches: [ "main" ]
# Allows this workflow to be manually run
workflow_dispatch:
jobs:
build:
runs-on: macos-12
steps:
- uses: actions/checkout@v3
- name: Xcode Select
uses: devbotsxyz/xcode-select@v1.1.0
with:
version: 13.3.1
- name: Build
run: swift build -v
test:
runs-on: macos-12
needs: [build]
steps:
- uses: actions/checkout@v3
- name: Xcode Select
uses: devbotsxyz/xcode-select@v1.1.0
with:
version: 13.3.1
- name: Test
run: swift test --enable-code-coverage
- name: Export Code Coverage
run: |
xcrun llvm-cov export -format="lcov" .build/debug/ETFKitPackageTests.xctest/Contents/MacOS/ETFKitPackageTests \
-instr-profile .build/debug/codecov/default.profdata > coverage.lcov
- name: Upload Code Coverage to Codecov
uses: codecov/codecov-action@v2
with:
files: ./coverage.lcov