-
Notifications
You must be signed in to change notification settings - Fork 68
51 lines (43 loc) · 1.24 KB
/
coverage.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: coverage
on:
push:
branches:
- main
paths:
- '**/*.swift'
- '.github/workflows/coverage.yml'
- '!Examples/**/*.swift'
pull_request:
branches:
- main
paths:
- '**/*.swift'
- '.github/workflows/coverage.yml'
- '!Examples/**/*.swift'
workflow_dispatch:
jobs:
coverage:
runs-on: windows-latest
strategy:
matrix:
include:
- branch: swift-5.9-release
tag: 5.9-RELEASE
steps:
- uses: actions/checkout@v2
- uses: seanmiddleditch/gha-setup-vsdevenv@master
- uses: compnerd/gha-setup-swift@main
with:
tag: ${{ matrix.tag }}
branch: ${{ matrix.branch }}
- name: Build
run: swift build -v
- name: Run tests
run: swift test -v -Xswiftc -DENABLE_TESTING --enable-code-coverage
- name: Process Coverage
run: |
llvm-cov export -format lcov -ignore-filename-regex ".build|Tests|Examples" -instr-profile .build\x86_64-unknown-windows-msvc\debug\codecov\default.profdata .build\x86_64-unknown-windows-msvc\debug\SwiftWin32PackageTests.xctest > coverage.lcov
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.lcov