Skip to content

Commit 439a908

Browse files
committed
CI updates
1 parent 115e9c1 commit 439a908

File tree

5 files changed

+32
-34
lines changed

5 files changed

+32
-34
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,23 @@ on: [push, pull_request]
44

55
jobs:
66
unit_tests:
7-
runs-on: ${{ matrix.os }}
7+
runs-on: ${{matrix.os}}
88
strategy:
99
max-parallel: 8
1010
matrix:
1111
os: [ubuntu-18.04, ubuntu-22.04, macos-12]
1212
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
1313
steps:
14-
- uses: actions/checkout@v2
15-
- name: Set up Python ${{ matrix.python-version }}
16-
uses: actions/setup-python@v2
14+
- uses: actions/checkout@v3
15+
- uses: actions/setup-python@v4
1716
with:
18-
python-version: ${{ matrix.python-version }}
19-
- name: Install
20-
run: |
17+
python-version: ${{matrix.python-version}}
18+
- run: |
2119
[[ $(uname) == Linux ]] && sudo apt-get install --no-install-recommends python3-openssl python3-lxml
22-
pip install coverage wheel
23-
make install
24-
- name: Test
25-
run: |
26-
make test
27-
- name: Upload coverage data
28-
run: |
29-
bash <(curl -s https://codecov.io/bash)
20+
- run: make install
21+
- run: make lint
22+
- run: make test
23+
- uses: codecov/codecov-action@v3
3024
black:
3125
runs-on: ubuntu-22.04
3226
steps:

Makefile

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,24 @@
1-
test_deps:
2-
pip install coverage flake8 wheel mypy types-certifi types-pyOpenSSL lxml-stubs
1+
SHELL=/bin/bash
32

4-
lint: test_deps
5-
flake8 $$(python setup.py --name) test
6-
mypy $$(python setup.py --name) --check-untyped-defs
3+
lint:
4+
flake8
5+
mypy --install-types --non-interactive --check-untyped-defs $$(dirname */__init__.py)
76

8-
test: test_deps lint
9-
coverage run --source=$$(python setup.py --name) ./test/test.py
7+
test:
8+
python ./test/test.py -v
109

1110
init_docs:
1211
cd docs; sphinx-quickstart
1312

1413
docs:
1514
sphinx-build docs docs/html
1615

17-
install: clean
18-
pip install wheel
19-
python setup.py bdist_wheel
20-
pip install --upgrade dist/*.whl
16+
install:
17+
-rm -rf dist
18+
python -m pip install build
19+
python -m build
20+
python -m pip install --upgrade $$(echo dist/*.whl)[tests]
2121

22-
clean:
23-
-rm -rf build dist
24-
-rm -rf *.egg-info
25-
26-
.PHONY: lint test test_deps docs install clean
22+
.PHONY: test lint release docs
2723

2824
include common.mk

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ Please report bugs, issues, feature requests, etc. on `GitHub <https://github.co
244244

245245
License
246246
-------
247-
Copyright 2014-2022, Andrey Kislyuk and SignXML contributors. Licensed under the terms of the
247+
Copyright 2014-2023, Andrey Kislyuk and SignXML contributors. Licensed under the terms of the
248248
`Apache License, Version 2.0 <http://www.apache.org/licenses/LICENSE-2.0>`_. Distribution of the LICENSE and NOTICE
249249
files with source copies of this package and derivative works is **REQUIRED** as specified by the Apache License.
250250

setup.cfg

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
[bdist_wheel]
2-
universal=1
31
[flake8]
42
max-line-length=120
53
extend-ignore=E203

setup.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@
2020
"pyOpenSSL >= 17.5.0",
2121
"certifi >= 2018.1.18",
2222
],
23+
extras_require={
24+
"tests": [
25+
"flake8",
26+
"coverage",
27+
"build",
28+
"wheel",
29+
"mypy",
30+
"lxml-stubs",
31+
]
32+
},
2333
packages=find_packages(exclude=["test"]),
2434
platforms=["MacOS X", "Posix"],
2535
package_data={"signxml": ["schemas/*.xsd", "py.typed"]},

0 commit comments

Comments
 (0)