Skip to content

Report test coverage to codecov.io #164

Report test coverage to codecov.io

Report test coverage to codecov.io #164

Workflow file for this run

name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build-and-test:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Bootstrap
run: make bootstrap
- uses: swift-actions/setup-swift@v1
with:
swift-version: "5.9"
- name: Build
run: swift build
- name: Run tests
run: swift test --enable-code-coverage
- name: Convert the coverage data
run: llvm-cov export -format="lcov" .build/x86_64-apple-macosx/debug/Web5PackageTests.xctest/Contents/MacOS/Web5PackageTests -instr-profile .build/x86_64-apple-macosx/debug/codecov/default.profdata > info.lcov
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@c16abc29c95fcf9174b58eb7e1abf4c866893bc8 # 4.1.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: TBD54566975/web5-swift
files: info.lcov