name: Test API before pr merge
run-name: Test API before pr merge
on:
  pull_request:
    types:
      - opened
      - edited
      - reopened
      - synchronize
      - ready_for_review

jobs:
  test-lint:
    runs-on: [ runner ]
    container: git.sh-edraft.de/sh-edraft.de/act-runner:latest
    steps:
      - name: Clone Repository
        uses: https://github.com/actions/checkout@v3
        with:
          token: ${{ secrets.CI_ACCESS_TOKEN }}

      - name: Installing dependencies
        working-directory: ./api
        run: |
          python3.12 -m pip install -r requirements-dev.txt

      - name: Checking black
        working-directory: ./api
        run: python3.12 -m black src --check