From 760097fe92941da4619beeb50353e94b44ae2080 Mon Sep 17 00:00:00 2001 From: Yax <1949284+kianby@users.noreply.github.com> Date: Sat, 11 Nov 2023 14:04:13 +0100 Subject: [PATCH] Fix test pipeline and clean-up config --- .github/workflows/pytest.yml | 36 ++++++++++++++++-------------------- Makefile | 14 +++++++++----- flake8.ini | 4 ---- whitelist.txt | 1 - 4 files changed, 25 insertions(+), 30 deletions(-) delete mode 100644 flake8.ini delete mode 100644 whitelist.txt diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 81d2900..6580871 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -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 }} diff --git a/Makefile b/Makefile index dac627d..7783729 100644 --- a/Makefile +++ b/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) \ No newline at end of file diff --git a/flake8.ini b/flake8.ini deleted file mode 100644 index 9b8e5e8..0000000 --- a/flake8.ini +++ /dev/null @@ -1,4 +0,0 @@ -[flake8] -max-line-length = 88 -extend-ignore = E203 -spellcheck-targets=comments diff --git a/whitelist.txt b/whitelist.txt deleted file mode 100644 index a44b465..0000000 --- a/whitelist.txt +++ /dev/null @@ -1 +0,0 @@ -RSS \ No newline at end of file