Skip to content

Commit

Permalink
CI updates
Browse files Browse the repository at this point in the history
  • Loading branch information
kislyuk committed Jan 9, 2023
1 parent 115e9c1 commit 439a908
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 34 deletions.
24 changes: 9 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,23 @@ on: [push, pull_request]

jobs:
unit_tests:
runs-on: ${{ matrix.os }}
runs-on: ${{matrix.os}}
strategy:
max-parallel: 8
matrix:
os: [ubuntu-18.04, ubuntu-22.04, macos-12]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install
run: |
python-version: ${{matrix.python-version}}
- run: |
[[ $(uname) == Linux ]] && sudo apt-get install --no-install-recommends python3-openssl python3-lxml
pip install coverage wheel
make install
- name: Test
run: |
make test
- name: Upload coverage data
run: |
bash <(curl -s https://codecov.io/bash)
- run: make install
- run: make lint
- run: make test
- uses: codecov/codecov-action@v3
black:
runs-on: ubuntu-22.04
steps:
Expand Down
28 changes: 12 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,28 +1,24 @@
test_deps:
pip install coverage flake8 wheel mypy types-certifi types-pyOpenSSL lxml-stubs
SHELL=/bin/bash

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

test: test_deps lint
coverage run --source=$$(python setup.py --name) ./test/test.py
test:
python ./test/test.py -v

init_docs:
cd docs; sphinx-quickstart

docs:
sphinx-build docs docs/html

install: clean
pip install wheel
python setup.py bdist_wheel
pip install --upgrade dist/*.whl
install:
-rm -rf dist
python -m pip install build
python -m build
python -m pip install --upgrade $$(echo dist/*.whl)[tests]

clean:
-rm -rf build dist
-rm -rf *.egg-info

.PHONY: lint test test_deps docs install clean
.PHONY: test lint release docs

include common.mk
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ Please report bugs, issues, feature requests, etc. on `GitHub <https://github.co

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

Expand Down
2 changes: 0 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
[bdist_wheel]
universal=1
[flake8]
max-line-length=120
extend-ignore=E203
Expand Down
10 changes: 10 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@
"pyOpenSSL >= 17.5.0",
"certifi >= 2018.1.18",
],
extras_require={
"tests": [
"flake8",
"coverage",
"build",
"wheel",
"mypy",
"lxml-stubs",
]
},
packages=find_packages(exclude=["test"]),
platforms=["MacOS X", "Posix"],
package_data={"signxml": ["schemas/*.xsd", "py.typed"]},
Expand Down

0 comments on commit 439a908

Please sign in to comment.