Skip to content

Rust

Rust #89

Workflow file for this run

name: Rust
on:
push:
branches: [ main ]
schedule:
- cron: 0 0 1 * *
pull_request:
branches: [ main ]
jobs:
test:
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
include:
- os: ubuntu-latest
lint: 1
runs-on: ${{ matrix.os }}
steps:
- name: Checkout source
uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: rustup update
run: rustup update
- name: cargo build
run: cargo build --all-features
- name: cargo test
run: cargo test --all-features
- name: rustfmt
if: github.event_name == 'pull_request' && matrix.lint
run: cargo fmt --all -- --check
- name: clippy
if: github.event_name == 'pull_request' && matrix.lint
run: cargo clippy --workspace --all-features --tests -- -D warnings