66 - master
77
88jobs :
9- changes :
10- name : Collect file changes
9+ pytest-changes :
10+ name : Collect allure-pytest file changes
11+ runs-on : ubuntu-latest
12+ outputs :
13+ changed : ${{ steps.filter.outputs.allure-pytest }}
14+ steps :
15+ - uses : dorny/paths-filter@v3
16+ id : filter
17+ with :
18+ filters : |
19+ allure-pytest:
20+ - allure-pytest/**
21+ - allure-python-commons/**
22+ - allure-python-commons-test/**
23+ - tests/*.py
24+ - tests/allure_pytest/**
25+ other-changes :
26+ name : Collect file changes other than allure-pytest
1127 runs-on : ubuntu-latest
1228 outputs :
1329 packages : ${{ steps.filter.outputs.changes }}
1430 steps :
15- - uses : dorny/paths-filter@v2
31+ - uses : dorny/paths-filter@v3
1632 id : filter
1733 with :
1834 filters : |
2844 - allure-python-commons-test/**
2945 - tests/*.py
3046 - tests/allure_nose2/**
31- allure-pytest:
32- - allure-pytest/**
33- - allure-python-commons/**
34- - allure-python-commons-test/**
35- - tests/*.py
36- - tests/allure_pytest/**
3747 allure-pytest-bdd:
3848 - allure-pytest-bdd/**
3949 - allure-python-commons/**
5363 name : Build commons
5464 runs-on : ubuntu-latest
5565 steps :
56- - uses : actions/checkout@v3
66+ - uses : actions/checkout@v4
5767
5868 - name : Cache commons
5969 id : commons
@@ -68,13 +78,13 @@ jobs:
6878 python -m build allure-python-commons --outdir dist/ &&
6979 python -m build allure-python-commons-test --outdir dist/
7080
71- linters :
81+ lint :
7282 name : Static check
7383 runs-on : ubuntu-latest
74- needs : [commons, changes]
75- if : ${{ needs.changes.outputs.packages != '[]' }}
84+ needs : [commons, pytest-changes, other- changes]
85+ if : ${{ needs.pytest-changes.outputs.changed || needs.other- changes.outputs.packages != '[]' }}
7686 steps :
77- - uses : actions/checkout@v3
87+ - uses : actions/checkout@v4
7888
7989 - name : Set up Python
8090 uses : actions/setup-python@v4
@@ -87,23 +97,67 @@ jobs:
8797 - name : Linting the codebase
8898 run : poe linter
8999
90- build :
91- name : Test package
100+ test-pytest :
101+ name : Test allure-pytest
92102 runs-on : ubuntu-latest
93- needs : [linters, commons, changes]
94- if : ${{ needs.changes.outputs.packages != '[]' }}
103+ needs : [commons, pytest- changes]
104+ if : ${{ needs.pytest- changes.outputs.changed }}
95105 strategy :
96106 matrix :
97- package : ${{ fromJSON(needs.changes.outputs.packages) }}
98107 python-version : ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
108+ pytest-version : ["7.*", "8.*"]
109+ exclude :
110+ - python-version : " 3.7"
111+ pytest-version : " 8.*"
99112 env :
100113 TEST_TMP : /tmp
101114 ALLURE_INDENT_OUTPUT : yep
102115 steps :
103- - uses : actions/checkout@v3
116+ - uses : actions/checkout@v4
104117
105118 - name : Set up Python ${{ matrix.python-version }}
106- uses : actions/setup-python@v4
119+ uses : actions/setup-python@v5
120+ with :
121+ python-version : ${{ matrix.python-version }}
122+
123+ - name : Get commons from cache
124+ id : commons
125+ uses : actions/cache@v3
126+ with :
127+ path : dist/
128+ key : commons-${{ github.sha }}
129+
130+ - name : Install packages
131+ run : |
132+ pip install dist/allure-python-commons*.tar.gz \
133+ ./allure-pytest \
134+ pytest==${{ matrix.pytest-version }} \
135+ -r ./requirements/testing.txt \
136+ -r ./requirements/testing/allure-pytest.txt
137+
138+ - name : Test allure-pytest
139+ working-directory : allure-pytest
140+ run : poe tests
141+
142+ test-others :
143+ name : Test packages other than allure-pytest
144+ runs-on : ubuntu-latest
145+ needs : [commons, other-changes]
146+ if : ${{ needs.other-changes.outputs.packages != '[]' }}
147+ strategy :
148+ matrix :
149+ package : ${{ fromJSON(needs.other-changes.outputs.packages) }}
150+ python-version : ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
151+ exclude :
152+ - package : allure-pytest
153+ env :
154+ TEST_TMP : /tmp
155+ ALLURE_INDENT_OUTPUT : yep
156+ steps :
157+ - uses : actions/checkout@v4
158+
159+ - name : Set up Python ${{ matrix.python-version }}
160+ uses : actions/setup-python@v5
107161 with :
108162 python-version : ${{ matrix.python-version }}
109163
0 commit comments