Coverage testing #260
Workflow file for this run
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: Rust | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
# Allow one instance of this workflow per pull request, and cancel older runs when new changes are pushed | |
concurrency: | |
group: ci-yaml-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
strategy: | |
matrix: | |
# windows-latest does not work because of https://github.com/oli-obk/ui_test/issues/147 | |
os: [ubuntu-latest, macos-latest] | |
java-version: ['17', '21'] | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'corretto' | |
java-version: ${{ matrix.java-version }} | |
- name: Install mdBook | |
if: matrix.os == 'ubuntu-latest' | |
run: curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.28/mdbook-v0.4.28-x86_64-unknown-linux-gnu.tar.gz | tar -xz | |
- name: Build | |
run: cargo build --verbose | |
- name: Test crates | |
run: cargo test --all-targets --verbose | |
- name: Test client crates | |
run: cargo test --all-targets --verbose --manifest-path=test-crates/Cargo.toml | |
- name: Test book | |
if: matrix.os == 'ubuntu-latest' | |
run: ./mdbook test book | |
coverage: | |
runs-on: 'ubuntu-latest' | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'corretto' | |
java-version: 17 | |
- uses: Swatinem/rust-cache@v2 | |
- name: install just | |
run: | | |
cargo install just | |
- name: coverage-deps | |
run: just coverage-tools | |
- name: | |
run: just coverage | |
- name: Upload Coverage Report | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ui-coverage-report | |
path: target/ui-coverage-report/ |