pasetors 0.8.0

PASETO: Platform-Agnostic Security Tokens (in Rust)
Documentation
on: [push, pull_request]
permissions:
  contents: read

name: Lints

# We don't need to run older workflows for the same PR's, since we always want the output of the newest ones.
concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
  cancel-in-progress: true

jobs:
  lints:
    name: rustfmt and clippy
    runs-on: ubuntu-latest
    steps:
      - name: Checkout sources
        uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
        with:
          persist-credentials: false

      - name: Install toolchain
        run: rustup toolchain install stable && rustup component add rustfmt && rustup component add clippy

      - name: Run cargo fmt
        run: cargo fmt --all -- --check

      - name: Run cargo clippy
        run: cargo clippy -- -D warnings

      - name: Run cargo clippy on tests
        run: cargo clippy --tests -- -D warnings