Skip to content

feat: release v0.8.8 #30

feat: release v0.8.8

feat: release v0.8.8 #30

Workflow file for this run

name: Code Coverage
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+rc[0-9]+'
env:
CARGO_TERM_COLOR: always
jobs:
code-coverage:
permissions:
contents: write
env:
CARGO_INCREMENTAL: '0'
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use nightly toolchain
run: |
rustup toolchain install nightly
rustup override set nightly
- name: Caching cargo dependencies
id: project-cache
uses: Swatinem/rust-cache@v2
- if: ${{ steps.cache-cargo.outputs.cache-hit != 'true' }}
name: Install grcov
run: cargo install grcov
- name: Make the USER own the working directory
if: ${{ matrix.os == 'ubuntu-latest' }}
run: sudo chown -R $USER:$USER ${{ github.workspace }}
- name: Run tests
working-directory: zork++
run: |
cargo test --all-features --no-fail-fast --target=x86_64-unknown-linux-gnu -- --show-output --test-threads=1
- name: Generate code coverage report
working-directory: zork++
run: |
grcov . -s . --binary-path ./target/debug/ -t html --branch --ignore-not-existing -o ./target/debug/coverage
grcov . -s . --binary-path ./target/debug/ -t cobertura --branch --ignore-not-existing -o ./target/debug/coverage/code_cov.xml
- name: Publish Test Results
uses: actions/upload-artifact@v3
with:
name: Unit Test Results
path: |
./zork++/target/debug/coverage/code_cov.xml
./zork++/target/debug/coverage/index.html
- name: Publish coverage report to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: ./zork++/target/debug/coverage
token: ${{ secrets.GITHUB_TOKEN }}