Skip to content

Commit

Permalink
Add lint and test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
theory committed Jun 28, 2024
1 parent e86889c commit cf778f1
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/test-and-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: 🧪 Test and Lint
on:
push:
branches-ignore: [wip/**]
jobs:
test:
strategy:
matrix:
os: [[🐧, Ubuntu], [🍎, macOS], [🪟, Windows]]
toolchain: ["stable", "beta", "nightly"]
name: Test 🦀 Rust ${{ matrix.toolchain }} on ${{ matrix.os[0] }} ${{ matrix.os[1] }}
runs-on: ${{ matrix.os[1] }}-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Rust Cache
uses: Swatinem/rust-cache@v2
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with: { toolchain: matrix.toolchain }
- name: Test
run: make test

lint:
name: 🔎 Lint and Cover
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Rust Cache
uses: Swatinem/rust-cache@v2
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with: { components: llvm-tools }
- name: Install Crates
run: cargo install grcov
- name: Run pre-commit
uses: pre-commit/[email protected]

0 comments on commit cf778f1

Please sign in to comment.