name: CI

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Clone instruction-files (path dependency)
        run: git clone --depth 1 https://github.com/btakita/instruction-files.git ../instruction-files

      - uses: dtolnay/rust-toolchain@stable
        with:
          components: clippy

      - run: cargo clippy -- -D warnings

      - run: cargo test
