feat: add test for two stations #5
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: CI | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
test: | |
name: ${{ matrix.os }} / ${{ matrix.rust }} (${{ matrix.feature }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
rust: [stable] | |
feature: ["std", "alloc", ""] | |
env: | |
RUST_BACKTRACE: full | |
RUSTV: ${{ matrix.rust }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Rust ${{ matrix.rust }} | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
components: rustfmt, clippy | |
- name: Cache cargo registry | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Install cargo components | |
uses: actions-rs/cargo@v1 | |
with: | |
command: install | |
args: clippy-sarif sarif-fmt | |
continue-on-error: true # This will error if it's already installed | |
- name: Clippy | |
run: | |
cargo clippy | |
--no-default-features | |
--features "${{ matrix.feature }}" | |
--message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt | |
continue-on-error: true | |
- name: Upload Clippy results to GitHub | |
uses: github/codeql-action/upload-sarif@v2 | |
with: | |
sarif_file: rust-clippy-results.sarif | |
wait-for-processing: true | |
- name: Tests | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --verbose --no-default-features --features "${{ matrix.feature }}" |