Skip to content

Commit 659c001

Browse files
committed
Add paths filter action
1 parent c214a86 commit 659c001

File tree

1 file changed

+23
-21
lines changed

1 file changed

+23
-21
lines changed

.github/workflows/build.yaml

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,24 @@ on:
66
- master
77

88
jobs:
9+
changes:
10+
name: Collect file changes
11+
runs-on: ubuntu-latest
12+
outputs:
13+
packages: ${{ steps.filter.outputs.changes }}
14+
steps:
15+
- uses: dorny/paths-filter@v2
16+
id: filter
17+
with:
18+
filters: |
19+
allure-behave: allure-behave/**
20+
allure-nose2: allure-nose2/**
21+
allure-pytest: allure-pytest/**
22+
allure-pytest-bdd: allure-pytest-bdd/**
23+
allure-python-commons: allure-python-commons/**
24+
allure-python-commons-test: allure-python-commons-test/**
25+
allure-robotframework: allure-robotframework/**
26+
927
commons:
1028
name: Build commons
1129
runs-on: ubuntu-latest
@@ -28,18 +46,10 @@ jobs:
2846
linters:
2947
name: Static check
3048
runs-on: ubuntu-latest
31-
needs: [commons]
49+
needs: [commons, changes]
3250
strategy:
3351
matrix:
34-
package: [
35-
allure-python-commons-test,
36-
allure-python-commons,
37-
allure-nose2,
38-
allure-behave,
39-
allure-pytest,
40-
allure-pytest-bdd,
41-
allure-robotframework
42-
]
52+
package: ${{ fromJSON(needs.changes.outputs.packages) }}
4353
steps:
4454
- uses: actions/checkout@v3
4555

@@ -65,20 +75,12 @@ jobs:
6575
run: poe linter
6676

6777
build:
68-
name: Build and test package
78+
name: Build package
6979
runs-on: ubuntu-latest
70-
needs: [linters, commons]
80+
needs: [linters, commons, changes]
7181
strategy:
7282
matrix:
73-
package: [
74-
allure-python-commons-test,
75-
allure-python-commons,
76-
allure-nose2,
77-
allure-behave,
78-
allure-pytest,
79-
allure-pytest-bdd,
80-
allure-robotframework
81-
]
83+
package: ${{ fromJSON(needs.changes.outputs.packages) }}
8284
python-version: [3.7, 3.8, 3.9, "3.10"]
8385
env:
8486
TEST_TMP: /tmp

0 commit comments

Comments
 (0)