name: 'On change: run pytest' on: push: branches: - 'main' pull_request: types: - 'ready_for_review' - 'opened' - 'synchronize' merge_group: jobs: check-changed-python-files: if: github.event.pull_request.draft == false runs-on: ubuntu-latest outputs: python_any_changed: ${{ steps.changed-files.outputs.python_any_changed }} steps: - uses: actions/checkout@v4 - name: Check for changed python files id: changed-files uses: tj-actions/changed-files@v40 with: files_yaml: | python: - 'pyproject.toml' - 'invokeai/**' - '!invokeai/frontend/web/**' - 'tests/**' run-pytest: needs: check-changed-python-files if: ${{ needs.check-changed-python-files.outputs.python_any_changed == 'true' }} uses: ./.github/workflows/check-pytest.yml