Skip to content

Workflow file for this run

name: Fmt, Clippy, Test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
name: test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node_index: [clippy, fmt, test]
steps:
- name: Checkout sources
uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.78.0
override: true
components: rustfmt, clippy
- uses: actions-rs/[email protected]
with:
crate: cargo-audit
version: latest
- name: Run cargo fmt
if: ${{ matrix.node_index == 'fmt' }}
run: cargo fmt --all -- --check
- name: Run cargo clippy
if: ${{ matrix.node_index == 'clippy' }}
run: cargo clippy -- -D warnings
- name: Run cargo test
if: ${{ matrix.node_index == 'test' }}
run: cargo test