name: CI

env:
  CARGO_TERM_COLOR: always

on:
  push:
    branches:
      - master
  pull_request: {}
  workflow_dispatch: null

permissions: {}

jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - name: checkout code
        uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
        with:
          persist-credentials: false

      - name: setup rust
        uses: dtolnay/rust-toolchain@b95584d8105b9ab200e15821fa671848cf2b7017 # nightly
        with:
          components: clippy, rustfmt

      - name: setup just
        uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff # v3

      - name: rust cache
        uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2

      - name: check
        run: just check
