name: Rust

on:
  push:
    branches: [ "PUSAT" ]
  pull_request:
    branches: [ "PUSAT" ]
  workflow_dispatch:

env:
  CARGO_TERM_COLOR: always

jobs:
  quality:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v4
    - uses: dtolnay/rust-toolchain@stable
      with:
        components: rustfmt
    - name: Format
      run: cargo fmt --check
    - name: Check
      run: cargo check --locked
    - name: Build
      run: cargo build --locked
    - name: Test
      run: cargo test --locked
