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

jobs:
  run_precommit:
    name: Run precommit
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: ./.github/actions/moshi_build
      - run: |
          source env/bin/activate
          pre-commit run --all-files
