Skip to content

Commit 9d34b57

Browse files
authored
Update swift.yml
1 parent f951c5f commit 9d34b57

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

.github/workflows/swift.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,20 @@ jobs:
3333
run: swift build -v
3434

3535
- name: Run tests
36-
run: |
37-
swift test -v
36+
run: swift test --enable-code-coverage -v
37+
38+
- name: Setup Xcode
39+
uses: maxim-lobanov/setup-xcode@v1.4.0
40+
with:
41+
xcode-version: latest-stable
42+
43+
- name: Gather code coverage
44+
run: xcrun llvm-cov export -format="lcov" .build/debug/SQLiteCloudPackageTests.xctest/Contents/MacOS/SQLiteCloudPackageTests -instr-profile .build/debug/codecov/default.profdata > coverage_report.lcov
45+
46+
- name: Upload coverage to Codecov
47+
uses: codecov/codecov-action@v2
48+
with:
49+
token: ${{ secrets.CODECOV_TOKEN }}
50+
fail_ci_if_error: fail
51+
files: ./coverage_report.lcov
52+
verbose: true

0 commit comments

Comments
 (0)