Fix test pipeline and clean-up config
This commit is contained in:
parent
e85157c5a0
commit
760097fe92
4 changed files with 25 additions and 30 deletions
36
.github/workflows/pytest.yml
vendored
36
.github/workflows/pytest.yml
vendored
|
@ -2,30 +2,26 @@ name: pytest
|
|||
on: push
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
python-version: [3.11.0]
|
||||
poetry-version: [1.2.2]
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
tests:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
python-version: [3.11.6]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install poetry
|
||||
uses: abatilo/actions-poetry@v2
|
||||
with:
|
||||
poetry-version: ${{ matrix.poetry-version }}
|
||||
- name: Install dependencies
|
||||
run: poetry install
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
- name: Set up rye
|
||||
uses: atu4403/setup-rye-multiOS@v1
|
||||
- name: Sync dependencies using rye
|
||||
run: |
|
||||
rye pin ${{ matrix.python-version }}
|
||||
rye sync
|
||||
- name: Pytest and Coverage
|
||||
run: |
|
||||
poetry run coverage run -m --source=stacosys pytest tests
|
||||
poetry run coverage report
|
||||
rye run coverage run -m --source=stacosys pytest tests
|
||||
rye run coverage report
|
||||
- name: Send report to Coveralls
|
||||
run: poetry run coveralls
|
||||
run: rye run coveralls
|
||||
env:
|
||||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
|
||||
|
|
14
Makefile
14
Makefile
|
@ -5,24 +5,28 @@ ifeq (run,$(firstword $(MAKECMDGOALS)))
|
|||
$(eval $(RUN_ARGS):;@:)
|
||||
endif
|
||||
|
||||
all: black test typehint lint
|
||||
# code quality
|
||||
all: black typehint lint
|
||||
|
||||
black:
|
||||
rye run isort --multi-line 3 --profile black src/ tests/
|
||||
rye run black --target-version py311 src/ tests/
|
||||
|
||||
test:
|
||||
rye run coverage run -m --source=stacosys pytest tests
|
||||
rye run coverage report
|
||||
|
||||
typehint:
|
||||
rye run mypy --ignore-missing-imports src/ tests/
|
||||
|
||||
lint:
|
||||
rye run pylint src/
|
||||
|
||||
# test
|
||||
test:
|
||||
rye run coverage run -m --source=stacosys pytest tests
|
||||
rye run coverage report
|
||||
|
||||
# build
|
||||
build:
|
||||
rye run pyinstaller stacosys.spec
|
||||
|
||||
# run
|
||||
run:
|
||||
rye run python src/stacosys/run.py $(RUN_ARGS)
|
|
@ -1,4 +0,0 @@
|
|||
[flake8]
|
||||
max-line-length = 88
|
||||
extend-ignore = E203
|
||||
spellcheck-targets=comments
|
|
@ -1 +0,0 @@
|
|||
RSS
|
Loading…
Add table
Reference in a new issue