Skip to content

Commit

Permalink
ci: report coverage to codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
lovetodream authored Mar 22, 2024
1 parent fb800a4 commit 516eea0
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,22 @@ on:
branches: [ "main" ]

jobs:
build:
test:
container:
image: swift:5.9-jammy

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Build
run: swift build -v
run: swift build
- name: Run tests
run: swift test -v
run: swift test --enable-code-coverage
- name: Prepare Code Coverage
run: llvm-cov export -format="lcov" .build/debug/swift-log-lokiPackageTests.xctest -instr-profile .build/debug/codecov/default.profdata > info.lcov
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: info.lcov

0 comments on commit 516eea0

Please sign in to comment.