name: Lint
on:
  push: { branches: [ "spielweise" ] }
  pull_request: { branches: [ "spielweise" ] }

jobs:
  codespell:
    runs-on: ubuntu-20.04
    steps:
      - uses: actions/checkout@v2
        with: { submodules: recursive }
      - uses: conda-incubator/setup-miniconda@v2
        with: { mamba-version: "*", channels: "conda-forge", channel-priority: true }
      - name: Install dependencies
        shell: bash -l {0}
        run: |
          mamba install codespell=2.2.2 pycodestyle=2.9.1
      - name: Run codespell
        shell: bash -l {0}
        run: codespell --ignore-file=.codespell_ignore kernel

env:
  MAKEFLAGS: -j2
