6
6
- master
7
7
8
8
jobs :
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
11
27
runs-on : ubuntu-latest
12
28
outputs :
13
29
packages : ${{ steps.filter.outputs.changes }}
14
30
steps :
15
- - uses : dorny/paths-filter@v2
31
+ - uses : dorny/paths-filter@v3
16
32
id : filter
17
33
with :
18
34
filters : |
28
44
- allure-python-commons-test/**
29
45
- tests/*.py
30
46
- 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/**
37
47
allure-pytest-bdd:
38
48
- allure-pytest-bdd/**
39
49
- allure-python-commons/**
53
63
name : Build commons
54
64
runs-on : ubuntu-latest
55
65
steps :
56
- - uses : actions/checkout@v3
66
+ - uses : actions/checkout@v4
57
67
58
68
- name : Cache commons
59
69
id : commons
@@ -68,13 +78,13 @@ jobs:
68
78
python -m build allure-python-commons --outdir dist/ &&
69
79
python -m build allure-python-commons-test --outdir dist/
70
80
71
- linters :
81
+ lint :
72
82
name : Static check
73
83
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 != '[]' }}
76
86
steps :
77
- - uses : actions/checkout@v3
87
+ - uses : actions/checkout@v4
78
88
79
89
- name : Set up Python
80
90
uses : actions/setup-python@v4
@@ -87,23 +97,67 @@ jobs:
87
97
- name : Linting the codebase
88
98
run : poe linter
89
99
90
- build :
91
- name : Test package
100
+ test-pytest :
101
+ name : Test allure-pytest
92
102
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 }}
95
105
strategy :
96
106
matrix :
97
- package : ${{ fromJSON(needs.changes.outputs.packages) }}
98
107
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.*"
99
112
env :
100
113
TEST_TMP : /tmp
101
114
ALLURE_INDENT_OUTPUT : yep
102
115
steps :
103
- - uses : actions/checkout@v3
116
+ - uses : actions/checkout@v4
104
117
105
118
- 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
107
161
with :
108
162
python-version : ${{ matrix.python-version }}
109
163
0 commit comments