-
Notifications
You must be signed in to change notification settings - Fork 122
51 lines (42 loc) · 1.28 KB
/
codecov.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: Codecov
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
coverage:
runs-on: macos-13
steps:
- uses: actions/checkout@v2
- name: Setup Xcode version
uses: maxim-lobanov/setup-xcode@v1.6.0
with:
xcode-version: ^15
- name: Download Test Resources
run: |
aws s3 cp --recursive s3://xctesthtmlreport/ ./Tests/XCTestHTMLReportTests/Resources/
env:
AWS_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
AWS_ENDPOINT_URL: ${{ secrets.AWS_ENDPOINT_URL }}
- name: Extract Test Resources
run: |
find Tests/XCTestHTMLReportTests/Resources -name '*.tar.gz' -execdir tar -xzvf '{}' \;
- name: Test
env:
XCODE_VERSION: 15
shell: bash
run: |
swift test --enable-code-coverage
- name: Export Coverage
env:
XCODE_VERSION: 15
shell: bash
run: |
xcrun llvm-cov export -format="lcov" \
.build/debug/XCTestHTMLReportPackageTests.xctest/Contents/MacOS/XCTestHTMLReportPackageTests -instr-profile \
.build/debug/codecov/default.profdata > info.lcov
- uses: codecov/codecov-action@v3
with:
files: info.lcov
verbose: true