Skip to content

Commit

Permalink
feat: use dynamic path filtering for github ci (#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
lrahmani authored Sep 20, 2023
1 parent b42d02d commit 877e49d
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,30 @@ on:
push:
branches:
- main
paths:
- "python/**"
- ".github/**"

pull_request:
branches:
- main
paths:
- "python/**"
- ".github/**"

jobs:
check-if-files-changed:
runs-on: ubuntu-latest
outputs:
uagents: ${{ steps.files-changed.outputs.uagents }}
steps:
- uses: dorny/paths-filter@v2
id: files-changed
with:
filters: |
uagents:
- 'python/**'
- '.github/**'
tests:
name: Tests
needs: check-if-files-changed
if: ${{ needs.check-if-files-changed.outputs.uagents == 'true' }}

defaults:
run:
shell: bash
Expand Down Expand Up @@ -64,6 +74,9 @@ jobs:
linting:
name: Lint & Formatting
needs: check-if-files-changed
if: ${{ needs.check-if-files-changed.outputs.uagents == 'true' }}

defaults:
run:
shell: bash
Expand Down

0 comments on commit 877e49d

Please sign in to comment.