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
|
on: push
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ci:
|
tests:
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
python-version: [3.11.0]
|
|
||||||
poetry-version: [1.2.2]
|
|
||||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, macos-latest]
|
||||||
|
python-version: [3.11.6]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- name: Checkout code
|
||||||
- uses: actions/setup-python@v4
|
uses: actions/checkout@v3
|
||||||
with:
|
- name: Set up rye
|
||||||
python-version: ${{ matrix.python-version }}
|
uses: atu4403/setup-rye-multiOS@v1
|
||||||
- name: Install poetry
|
- name: Sync dependencies using rye
|
||||||
uses: abatilo/actions-poetry@v2
|
run: |
|
||||||
with:
|
rye pin ${{ matrix.python-version }}
|
||||||
poetry-version: ${{ matrix.poetry-version }}
|
rye sync
|
||||||
- name: Install dependencies
|
|
||||||
run: poetry install
|
|
||||||
- name: Pytest and Coverage
|
- name: Pytest and Coverage
|
||||||
run: |
|
run: |
|
||||||
poetry run coverage run -m --source=stacosys pytest tests
|
rye run coverage run -m --source=stacosys pytest tests
|
||||||
poetry run coverage report
|
rye run coverage report
|
||||||
- name: Send report to Coveralls
|
- name: Send report to Coveralls
|
||||||
run: poetry run coveralls
|
run: rye run coveralls
|
||||||
env:
|
env:
|
||||||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
|
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
|
||||||
|
|
14
Makefile
14
Makefile
|
@ -5,24 +5,28 @@ ifeq (run,$(firstword $(MAKECMDGOALS)))
|
||||||
$(eval $(RUN_ARGS):;@:)
|
$(eval $(RUN_ARGS):;@:)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
all: black test typehint lint
|
# code quality
|
||||||
|
all: black typehint lint
|
||||||
|
|
||||||
black:
|
black:
|
||||||
rye run isort --multi-line 3 --profile black src/ tests/
|
rye run isort --multi-line 3 --profile black src/ tests/
|
||||||
rye run black --target-version py311 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:
|
typehint:
|
||||||
rye run mypy --ignore-missing-imports src/ tests/
|
rye run mypy --ignore-missing-imports src/ tests/
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
rye run pylint src/
|
rye run pylint src/
|
||||||
|
|
||||||
|
# test
|
||||||
|
test:
|
||||||
|
rye run coverage run -m --source=stacosys pytest tests
|
||||||
|
rye run coverage report
|
||||||
|
|
||||||
|
# build
|
||||||
build:
|
build:
|
||||||
rye run pyinstaller stacosys.spec
|
rye run pyinstaller stacosys.spec
|
||||||
|
|
||||||
|
# run
|
||||||
run:
|
run:
|
||||||
rye run python src/stacosys/run.py $(RUN_ARGS)
|
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