Skip to content

Commit

Permalink
Trigger workflows only when necessary file changes are detected (#699)
Browse files Browse the repository at this point in the history
* Trigger workflows only when necessary file changes are detected

* Address yamllint

* Trigger workflows even when workflow file itself is changed

* Also include `examples` directory, may be one day we will have tests for them

* `brew` and `docker` workflows must also only execute for python file changes.  This will skip them for pure README.md changes

* Execute `lib` workflows for package artifact changes
  • Loading branch information
abhinavsingh authored Nov 7, 2021
1 parent 3cb0a62 commit 2c4ad46
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 4 deletions.
24 changes: 23 additions & 1 deletion .github/workflows/test-brew.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,29 @@
---
name: brew

on: [push, pull_request] # yamllint disable-line rule:truthy
on: # yamllint disable-line rule:truthy
push:
paths:
- 'proxy/**'
- 'tests/**'
- 'examples/**'
- 'requirements*'
- 'setup.cfg'
- 'version-check.py'
- 'MANIFEST.in'
- '.github/workflows/test-brew.yml'
- 'helper/homebrew/**'
pull_request:
paths:
- 'proxy/**'
- 'tests/**'
- 'examples/**'
- 'requirements*'
- 'setup.cfg'
- 'version-check.py'
- 'MANIFEST.in'
- '.github/workflows/test-brew.yml'
- 'helper/homebrew/**'

jobs:
build:
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/test-dashboard.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
---
name: dashboard

on: [push, pull_request] # yamllint disable-line rule:truthy
on: # yamllint disable-line rule:truthy
push:
paths:
- 'dashboard/**'
- '.github/workflows/test-dashboard.yml'
pull_request:
paths:
- 'dashboard/**'
- '.github/workflows/test-dashboard.yml'

jobs:
build:
Expand Down
24 changes: 23 additions & 1 deletion .github/workflows/test-docker.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,29 @@
---
name: docker

on: [push, pull_request] # yamllint disable-line rule:truthy
on: # yamllint disable-line rule:truthy
push:
paths:
- 'proxy/**'
- 'tests/**'
- 'examples/**'
- 'requirements*'
- 'setup.cfg'
- 'version-check.py'
- 'MANIFEST.in'
- '.github/workflows/test-docker.yml'
- 'Dockerfile'
pull_request:
paths:
- 'proxy/**'
- 'tests/**'
- 'examples/**'
- 'requirements*'
- 'setup.cfg'
- 'version-check.py'
- 'MANIFEST.in'
- '.github/workflows/test-docker.yml'
- 'Dockerfile'

jobs:
build:
Expand Down
22 changes: 21 additions & 1 deletion .github/workflows/test-library.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,27 @@
---
name: lib

on: [push, pull_request] # yamllint disable-line rule:truthy
on: # yamllint disable-line rule:truthy
push:
paths:
- 'proxy/**'
- 'tests/**'
- 'examples/**'
- 'requirements*'
- 'setup.cfg'
- 'version-check.py'
- 'MANIFEST.in'
- '.github/workflows/test-library.yml'
pull_request:
paths:
- 'proxy/**'
- 'tests/**'
- 'examples/**'
- 'requirements*'
- 'setup.cfg'
- 'version-check.py'
- 'MANIFEST.in'
- '.github/workflows/test-library.yml'

concurrency:
group: >-
Expand Down

0 comments on commit 2c4ad46

Please sign in to comment.