-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (34 loc) · 1.07 KB
/
swift-pacakge.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
name: Swift Package
on: [push, workflow_dispatch]
jobs:
build:
name: Build
runs-on: macOS-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Build
run: |
swift --version
swift build -v
test:
name: Test
runs-on: macOS-latest
needs: build
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Test
run: |
swift test -v --enable-code-coverage
- name: Generate Code Coverage File
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
run: |
xcrun llvm-cov export --format=lcov --instr-profile=".build/debug/codecov/default.profdata" ".build/debug/MethodNotificationCenterPackageTests.xctest/Contents/MacOS/MethodNotificationCenterPackageTests" > "./codecov.lcov"
- name: Upload Code Coverage
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./codecov.lcov
verbose: true