name: CI
on:
  push:
    branches-ignore:
      - refs/heads/1.0.x
      - refs/heads/1.1.x
      - refs/heads/1.2.x
  pull_request:
    branches-ignore:
      - refs/heads/1.0.x
      - refs/heads/1.1.x
      - refs/heads/1.2.x
  workflow_dispatch:
jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: Setup Python environment
        uses: actions/setup-python@v5
        with:
          python-version: "3.8"
      - name: Install flake8
        run: pip install flake8
      - name: Install black
        run: pip install black
      - name: Check code formatting (with black and flake8)
        run: ./tools/check-code-formatting
