name: Code checks

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

jobs:

  pre-commit:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
        env:
          # Skip runic-pre-commit since we use runic-action below instead
          SKIP: runic

  runic:
    name: "Runic"
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - uses: julia-actions/setup-julia@v2
        with:
          version: '1.11'
      - uses: julia-actions/cache@v2
      - uses: fredrikekre/runic-action@v1
        with:
          version: "1.4" # Keep version in sync with .pre-commit-config.yaml
