mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
43 lines
1.1 KiB
YAML
43 lines
1.1 KiB
YAML
# This workflow runs of `check-pytest.yml` on push or pull request.
|
|
#
|
|
# The actual checks are in a separate workflow to support simpler workflow
|
|
# composition without awkward or complicated conditionals.
|
|
|
|
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
|