Skip to content

Commit

Permalink
Add a CI job
Browse files Browse the repository at this point in the history
  • Loading branch information
jerzywilczek committed Oct 5, 2023
1 parent 29d5350 commit a064109
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: lint and test
on:
push:
branches: [main]
pull_request:
types: [opened, synchronize]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
rust:
runs-on: ubuntu-latest
steps:
- name: 🔧 Install the rust toolchain
uses: dtolnay/rust-toolchain@stable

- name: 🔬 Install nextest
uses: taiki-e/install-action@v2
with:
tool: cargo-nextest

- name: 📥 Checkout repo
uses: actions/checkout@v3

- name: 📁 Rust cache
uses: Swatinem/rust-cache@v2

- name: 📖 Check formatting
run: cargo fmt --check

- name: 📎 Run clippy
run: cargo clippy --all-targets --all-features -- -D warnings

- name: 🧪 Run tests
run: cargo nextest run --no-fail-fast

- name: 📚 Run doctests
run: cargo test --doc

0 comments on commit a064109

Please sign in to comment.