Improve test coverage. #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
pull_request: | |
branches: ["*"] | |
tags-ignore: ["**"] | |
jobs: | |
macos-arm: | |
name: macOS (arm64) | |
runs-on: macos-15 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Build and Test | |
run: swift test --enable-code-coverage | |
- name: Prepare coverage report | |
run: xcrun llvm-cov export -format="lcov" .build/debug/TimePackageTests.xctest/Contents/MacOS/TimePackageTests -instr-profile .build/debug/codecov/default.profdata > info.lcov | |
- name: Upload test coverage | |
if: github.ref == 'refs/heads/master' | |
uses: codecov/codecov-action@v5 | |
with: | |
fail_ci_if_error: true | |
files: info.lcov | |
token: ${{ secrets.CODECOV_TOKEN }} | |
macos-intel: | |
name: macOS (x64) | |
runs-on: macos-15-large | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Build and Test | |
run: swift test | |
linux: | |
name: Linux | |
runs-on: ubuntu-latest | |
container: | |
image: swift:6.0 | |
options: --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --security-opt apparmor=unconfined | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Build and Test | |
run: swift test --enable-test-discovery |