ci: attempt to capture test results and upload them #98
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: "Test Suite" | |
on: | |
push: | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
name: cargo test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: nightly | |
- name: Start minio | |
run: ./ci/minio_start.sh | |
- run: cargo test --all-features -- -Z unstable-options --format json --report-time | tee results.json | |
- name: Prepare junit report | |
id: cargo_reporter | |
uses: innoq/action-cargo-test-report@v1 | |
with: | |
cargo-test-report-json: 'results.json' | |
- name: Publish Test Report | |
uses: mikepenz/action-junit-report@v4 | |
if: always() # always run even if the previous step fails | |
with: | |
check_name: Test Report | |
fail_on_failure: true | |
require_tests: true | |
annotate_only: true | |
summary: ${{ steps.cargo_reporter.outputs.summary }} | |
- name: Stop minio | |
run: ./ci/minio_stop.sh | |
# Check formatting with rustfmt | |
formatting: | |
name: cargo fmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
# Ensure rustfmt is installed and setup problem matcher | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
components: rustfmt | |
- name: Rustfmt Check | |
uses: actions-rust-lang/rustfmt@v1 | |
lint: | |
name: cargo clippy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
- run: cargo clippy --all-features --all-targets --workspace -- -D warnings |