Skip to content

Rust

Rust #70

Workflow file for this run

name: Rust
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: '0 0 * * 4'
jobs:
msrv:
name: MSRV
runs-on: ubuntu-latest
env:
rust_ver: "1.56"
steps:
- name: Checkout sources
uses: actions/checkout@v3
- run: rustup toolchain install $rust_ver --profile minimal --no-self-update
- run: rustup default $rust_version
- uses: Swatinem/rust-cache@v2
- run: cargo test
check:
name: Check
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
test:
name: Test Suite
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Run cargo test
run: cargo test
lints:
name: Lints
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Run cargo fmt
run: |
rustup component add rustfmt
cargo fmt --all -- --check
- name: Run cargo clippy
run: |
rustup component add clippy
cargo clippy -- -D warnings