Skip to content

Simplify tests

Simplify tests #18

Workflow file for this run

name: Code Coverage
on:
push:
branches: [ develop ]
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
job:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Build
run: swift build
- name: Run tests
run: swift test --enable-test-discovery --enable-code-coverage
# https://nacho4d-nacho4d.blogspot.com/2020/10/code-coverage-for-swift-package-projects.html
- name: Convert code coverage
run: xcrun llvm-cov export -format="lcov" -instr-profile=$(find .build -name default.profdata) $(find .build -name InjectorPackageTests) > info.lcov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: info.lcov
fail_ci_if_error: true