name: CI

on:
  push:
    branches: ["**"]
  pull_request:
    branches: [master]

jobs:
  check:
    name: Lint & Test
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - uses: dtolnay/rust-toolchain@stable

      - uses: Swatinem/rust-cache@v2

      - name: Clippy
        run: cargo clippy --tests -- -D warnings

      - name: Test
        run: cargo test
