name: CI

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

concurrency:
  group: ${{ github.event.number || github.run_id }}
  cancel-in-progress: true

jobs:
  testing:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: install python 3.9
        uses: actions/setup-python@v5
        with:
          python-version: "3.9"
          cache: "pip" # caching pip dependencies
      - name: Check formatting (black)
        run: |
          pip install black
          black . --check
