Skip to content

ci: Enable junit support for the main CI run as well #1467

ci: Enable junit support for the main CI run as well

ci: Enable junit support for the main CI run as well #1467

Workflow file for this run

name: CI
on:
push:
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
style:
name: Check style
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
- name: Install rust
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9
with:
toolchain: nightly
components: rustfmt
- name: Cargo fmt
run: cargo fmt --all -- --check
typos:
name: Spell Check with Typos
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
- name: Check the spelling of the files in our repo
uses: crate-ci/typos@07d900b8fa1097806b8adb6391b0d3e0ac2fdea7
clippy:
name: Run clippy
needs: [style]
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
- name: Install rust
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9
with:
toolchain: nightly
components: clippy
- uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1
- name: Clippy (all-features)
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Clippy (no-default-features)
run: cargo clippy --all-targets --no-default-features -- -D warnings
hack:
name: Check that each feature compiles independently
needs: [style]
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
- name: Install Rust
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9
with:
toolchain: stable
- name: Load cache
uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1
- name: Install cargo-hack
uses: taiki-e/install-action@44c6d64aa62cd779e873306675c7a58e86d6d532
with:
tool: cargo-hack
- name: Check that our features compile
run: cargo hack check --each-feature --no-dev-deps
test:
name: ${{ matrix.target.name }} ${{ matrix.channel }}
needs: [clippy]
runs-on: ${{ matrix.target.os }}
strategy:
matrix:
target: [
{ "os": "ubuntu-latest", "toolchain": "x86_64-unknown-linux-gnu", "name": "Linux GNU" },
{ "os": "macos-13", "toolchain": "x86_64-apple-darwin ", "name": "macOS x86" },
{ "os": "macos-latest", "toolchain": "aarch64-apple-darwin", "name": "macOS arm" },
{ "os": "windows-latest", "toolchain": "x86_64-pc-windows-msvc", "name": "Windows MSVC" },
]
channel: [stable, beta, nightly]
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
- name: Install rust
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9
with:
toolchain: ${{ format('{0}-{1}', matrix.channel, matrix.target.toolchain) }}
- name: Install nextest
uses: taiki-e/install-action@44c6d64aa62cd779e873306675c7a58e86d6d532
with:
tool: nextest
- uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1
- name: Test
run: cargo nextest run --profile ci --all-features
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f
with:
files: ./target/nextest/ci/junit.xml
token: ${{ secrets.CODECOV_TOKEN }}