Skip to content

2023-10-19 work

2023-10-19 work #64

Workflow file for this run

name: rust
on:
push:
branches:
- main
pull_request:
branches: [main]
types: [opened, synchronize]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
lint: # inspired by https://github.com/EmbarkStudios/rust-gpu/blob/main/.github/workflows/ci.yaml
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install rustup components
run: rustup component add rustfmt clippy
- name: Install rust-toolchain # cargo version is a random command that forces the installation of rust-toolchain
run: cargo version
- name: cargo fetch
run: cargo fetch
- name: Rustfmt
run: cargo fmt --all -- --check
- name: Check docs are valid
run: RUSTDOCFLAGS=-Dwarnings cargo doc --no-deps
- name: Clippy
run: cargo clippy