Skip to content

Commit

Permalink
only run python tests when python files change (#83)
Browse files Browse the repository at this point in the history
* add path filter to python tests

* ci update

* ci filter update
  • Loading branch information
darthtrevino authored Apr 4, 2024
1 parent 9d4d9e4 commit 79f01ed
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/javascript-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ on:
push:
branches: [main]
pull_request:
paths:
'**/*'
branches: [main]
jobs:
javascript-ci:
runs-on: ubuntu-latest
Expand Down
22 changes: 21 additions & 1 deletion .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ on:
push:
branches: [main]
pull_request:
paths: "**/*"
branches: [main]

permissions:
contents: read
pull-requests: read

jobs:
python-ci:
runs-on: ubuntu-latest
Expand All @@ -15,6 +20,19 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: dorny/paths-filter@v3
id: changes
with:
filters: |
python:
- 'graphrag/**/*'
- 'poetry.lock'
- 'pyproject.toml'
- '**/*.py'
- '**/*.toml'
- '**/*.ipynb'
- .github/workflows/python-ci.yml
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
Expand Down Expand Up @@ -57,6 +75,7 @@ jobs:
GRAPHRAG_API_KEY: ${{ secrets.OPENAI_API_KEY }}

- name: Smoke Test
if: steps.changes.outputs.python == 'true'
run: |
poetry run poe test_smoke
env:
Expand All @@ -65,5 +84,6 @@ jobs:
GRAPHRAG_EMBEDDING_MODEL: text-embedding-3-small

- name: E2E Test
if: steps.changes.outputs.python == 'true'
run: |
./scripts/e2e-test.sh

0 comments on commit 79f01ed

Please sign in to comment.