updating code-quality to use template #22
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: Unit Tests | |
permissions: | |
checks: write | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: [opened, synchronize, reopened] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
test: | |
name: Check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Setup Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
- name: Run `cargo test` | |
run: | | |
cargo test -- -Z unstable-options --format json --report-time | tee results.json | |
- name: Prepare JUnit Report | |
id: report | |
uses: innoq/action-cargo-test-report@main | |
with: | |
cargo-test-report-json: 'results.json' | |
- name: Publish Test Report | |
uses: mikepenz/action-junit-report@main | |
if: always() | |
with: | |
check_name: Report | |
fail_on_failure: true | |
require_tests: true | |
summary: ${{ steps.report.outputs.summary }} |