Skip to content

Commit

Permalink
ci: Update CI path filters for frontend tests (langflow-ai#4571)
Browse files Browse the repository at this point in the history
* Update changes-filter.yaml to include new component and starter project paths

* Update CI path filters and conditions for frontend and component changes
  • Loading branch information
ogabrielluiz authored Nov 13, 2024
1 parent da03993 commit 313f197
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
7 changes: 5 additions & 2 deletions .github/changes-filter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ python:
- "pyproject.toml"
- "poetry.lock"
- "**/python_test.yml"
tests:
- "tests/**"
components-changes:
- "src/backend/base/langflow/components/**"
starter-projects-changes:
- "src/backend/base/langflow/initial_setup/**"
frontend-tests:
- "src/frontend/tests/**"
frontend:
- "src/frontend/**"
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,15 @@ jobs:
path-filter:
needs: set-ci-condition
if: ${{ needs.set-ci-condition.outputs.should-run-ci == 'true' }}

name: Filter Paths
runs-on: ubuntu-latest
outputs:
python: ${{ steps.filter.outputs.python }}
frontend: ${{ steps.filter.outputs.frontend }}
docs: ${{ steps.filter.outputs.docs }}
tests: ${{ steps.filter.outputs.tests }}
frontend-tests: ${{ steps.filter.outputs.frontend-tests }}
components-changes: ${{ steps.filter.outputs.components-changes }}
starter-projects-changes: ${{ steps.filter.outputs.starter-projects-changes }}
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -76,15 +77,15 @@ jobs:
test-backend:
needs: path-filter
name: Run Backend Tests
if: ${{ needs.path-filter.outputs.python == 'true' || needs.path-filter.outputs.tests == 'true' }}
if: ${{ needs.path-filter.outputs.python == 'true'}}
uses: ./.github/workflows/python_test.yml
with:
python-versions: ${{ inputs.python-versions || '["3.10"]' }}

test-frontend:
needs: path-filter
name: Run Frontend Tests
if: ${{ needs.path-filter.outputs.python == 'true' || needs.path-filter.outputs.frontend == 'true' || needs.path-filter.outputs.tests == 'true' }}
if: ${{ needs.path-filter.outputs.frontend == 'true' || needs.path-filter.outputs.frontend-tests == 'true' || needs.path-filter.outputs.components-changes == 'true' || needs.path-filter.outputs.starter-projects-changes == 'true' }}
uses: ./.github/workflows/typescript_test.yml
with:
tests_folder: ${{ inputs.frontend-tests-folder }}
Expand All @@ -94,10 +95,9 @@ jobs:

lint-backend:
needs: path-filter
if: ${{ needs.path-filter.outputs.python == 'true' || needs.path-filter.outputs.tests == 'true' }}
if: ${{ needs.path-filter.outputs.python == 'true'}}
name: Lint Backend
uses: ./.github/workflows/lint-py.yml
# Run only if there are python files changed

test-docs-build:
needs: path-filter
Expand Down

0 comments on commit 313f197

Please sign in to comment.