14
14
# Allows you to run this workflow manually from the Actions tab
15
15
workflow_dispatch :
16
16
17
-
18
17
jobs :
19
18
test :
20
19
strategy :
21
20
matrix :
22
21
python-version :
23
- - 3.5
24
- - 3.6
25
- - 3.7
26
- - 3.8
27
- - 3.9
22
+ - " 3.7"
23
+ - " 3.8"
24
+ - " 3.9"
28
25
- " 3.10"
29
26
- " 3.11"
30
27
- " 3.12"
31
28
include :
32
29
- os : ubuntu-latest
33
- setup-python-env : {}
34
30
35
31
# older versions need older OS
36
- - python-version : 3.5
37
- os : ubuntu-20.04
38
- setup-python-env :
39
- PIP_TRUSTED_HOST : " pypi.python.org pypi.org files.pythonhosted.org"
40
- - python-version : 3.6
41
- os : ubuntu-20.04
32
+ - python-version : " 3.7"
33
+ os : ubuntu-22.04
34
+
35
+ - python-version : " 3.8"
36
+ os : ubuntu-22.04
42
37
43
38
runs-on : ${{ matrix.os }}
44
39
45
40
steps :
46
41
- uses : actions/checkout@v3
47
42
48
- - name : Set up Python 3.7 to bootstrap py3.6 and py3.5
49
- if : ${{ matrix.python-version == '3.6' || matrix.python-version == '3.5' }}
50
- uses : actions/setup-python@v5
51
- with :
52
- python-version : 3.7
53
-
54
43
- name : Set up Python ${{ matrix.python-version }}
55
44
uses : actions/setup-python@v5
56
45
with :
57
46
python-version : ${{ matrix.python-version }}
58
- env : ${{ matrix.setup-python-env }}
59
-
60
- # Python 3.6 & 3.7 cannot install directly from a pyproject.toml
61
- # Instead, build a wheel from py3.7 and then install it
62
- - name : Install via wheel
63
- if : ${{ matrix.python-version == '3.6' || matrix.python-version == '3.5' }}
64
- run : |
65
- python3.7 -m pip install build
66
- python3.7 -m build
67
- python --version
68
- python -m pip install ./dist/*.whl
69
47
70
48
- name : Install dependencies
71
49
run : |
72
- python -m pip install -U pytest
50
+ python -m pip install pytest
73
51
sudo apt update
74
52
sudo apt install libxml2-utils
75
53
tests/schema/1685-2014/download_schema.sh
76
54
tests/schema/1685-2009/download_schema.sh
77
55
78
- - name : Install coverage tools
79
- if : ${{ matrix.python-version == 3.10 }}
80
- run : |
81
- python -m pip install pytest-cov coverage>=6.3
82
-
83
56
- name : Install
84
- if : ${{ matrix.python-version != '3.6' && matrix.python-version != '3.5' }}
85
57
run : |
86
- python -m pip install .
58
+ python -m pip install ".[cli]"
87
59
88
60
- name : Test
89
- if : ${{ matrix.python-version != 3.10 }}
90
61
run : |
91
62
cd tests
92
- pytest
63
+ pytest --cov=peakrdl_ipxact
93
64
94
- - name : Test with Coverage
95
- if : ${{ matrix.python-version == 3.10 }}
65
+ - name : Coveralls
66
+ env :
67
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
68
+ COVERALLS_PARALLEL : true
96
69
run : |
97
70
cd tests
98
- pytest --cov=peakrdl_ipxact --cov-report lcov:cov.info
99
-
100
- - name : Coveralls
101
- if : ${{ matrix.python-version == 3.10 }}
102
- uses : coverallsapp/github-action@master
103
- with :
104
- github-token : ${{ secrets.GITHUB_TOKEN }}
105
- path-to-lcov : tests/cov.info
71
+ coveralls --service=github
106
72
107
73
# -------------------------------------------------------------------------------
108
74
lint :
@@ -116,11 +82,11 @@ jobs:
116
82
117
83
- name : Install dependencies
118
84
run : |
119
- python -m pip install -U pylint
85
+ python -m pip install pylint
120
86
121
87
- name : Install
122
88
run : |
123
- python -m pip install .
89
+ python -m pip install ".[cli]"
124
90
125
91
- name : Run Lint
126
92
run : |
@@ -138,7 +104,11 @@ jobs:
138
104
139
105
- name : Install dependencies
140
106
run : |
141
- python -m pip install -U mypy
107
+ python -m pip install mypy
108
+
109
+ - name : Install
110
+ run : |
111
+ python -m pip install ".[cli]"
142
112
143
113
- name : Type Check
144
114
run : |
@@ -162,13 +132,14 @@ jobs:
162
132
163
133
- name : Install dependencies
164
134
run : |
165
- python -m pip install -U build
135
+ python -m pip install build
166
136
167
137
- name : Build
168
138
run : python -m build
169
139
170
140
- uses : actions/upload-artifact@v4
171
141
with :
142
+ name : dist
172
143
path : |
173
144
dist/*.tar.gz
174
145
dist/*.whl
@@ -188,7 +159,7 @@ jobs:
188
159
steps :
189
160
- uses : actions/download-artifact@v4
190
161
with :
191
- name : artifact
162
+ name : dist
192
163
path : dist
193
164
194
165
- uses : pypa/gh-action-pypi-publish@release/v1
0 commit comments