1414 # Allows you to run this workflow manually from the Actions tab
1515 workflow_dispatch :
1616
17-
1817jobs :
1918 test :
2019 strategy :
2120 matrix :
2221 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"
2825 - " 3.10"
2926 - " 3.11"
3027 - " 3.12"
3128 include :
3229 - os : ubuntu-latest
33- setup-python-env : {}
3430
3531 # 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
4237
4338 runs-on : ${{ matrix.os }}
4439
4540 steps :
4641 - uses : actions/checkout@v3
4742
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-
5443 - name : Set up Python ${{ matrix.python-version }}
5544 uses : actions/setup-python@v5
5645 with :
5746 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
6947
7048 - name : Install dependencies
7149 run : |
72- python -m pip install -U pytest
50+ python -m pip install pytest
7351 sudo apt update
7452 sudo apt install libxml2-utils
7553 tests/schema/1685-2014/download_schema.sh
7654 tests/schema/1685-2009/download_schema.sh
7755
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-
8356 - name : Install
84- if : ${{ matrix.python-version != '3.6' && matrix.python-version != '3.5' }}
8557 run : |
86- python -m pip install .
58+ python -m pip install ".[cli]"
8759
8860 - name : Test
89- if : ${{ matrix.python-version != 3.10 }}
9061 run : |
9162 cd tests
92- pytest
63+ pytest --cov=peakrdl_ipxact
9364
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
9669 run : |
9770 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
10672
10773# -------------------------------------------------------------------------------
10874 lint :
@@ -116,11 +82,11 @@ jobs:
11682
11783 - name : Install dependencies
11884 run : |
119- python -m pip install -U pylint
85+ python -m pip install pylint
12086
12187 - name : Install
12288 run : |
123- python -m pip install .
89+ python -m pip install ".[cli]"
12490
12591 - name : Run Lint
12692 run : |
@@ -138,7 +104,11 @@ jobs:
138104
139105 - name : Install dependencies
140106 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]"
142112
143113 - name : Type Check
144114 run : |
@@ -162,13 +132,14 @@ jobs:
162132
163133 - name : Install dependencies
164134 run : |
165- python -m pip install -U build
135+ python -m pip install build
166136
167137 - name : Build
168138 run : python -m build
169139
170140 - uses : actions/upload-artifact@v4
171141 with :
142+ name : dist
172143 path : |
173144 dist/*.tar.gz
174145 dist/*.whl
@@ -188,7 +159,7 @@ jobs:
188159 steps :
189160 - uses : actions/download-artifact@v4
190161 with :
191- name : artifact
162+ name : dist
192163 path : dist
193164
194165 - uses : pypa/gh-action-pypi-publish@release/v1
0 commit comments