mirror of
https://github.com/enpaul/peewee-plus.git
synced 2024-12-22 15:53:29 +00:00
Update CI and toxfile to use new group structure
This commit is contained in:
parent
ac342d4dc6
commit
750d3c07b6
9
.github/scripts/setup-env.sh
vendored
9
.github/scripts/setup-env.sh
vendored
@ -8,7 +8,7 @@
|
||||
set -e;
|
||||
|
||||
CI_CACHE=$HOME/.cache;
|
||||
POETRY_VERSION=1.2.2;
|
||||
INSTALL_POETRY_VERSION="${POETRY_VERSION:-1.4.1}";
|
||||
|
||||
mkdir --parents "$CI_CACHE";
|
||||
|
||||
@ -26,9 +26,10 @@ poetry --version --no-ansi;
|
||||
poetry run pip --version;
|
||||
|
||||
poetry install \
|
||||
--quiet \
|
||||
--remove-untracked \
|
||||
--no-ansi;
|
||||
--sync \
|
||||
--no-ansi \
|
||||
--no-root \
|
||||
--only ci;
|
||||
|
||||
poetry env info;
|
||||
poetry run tox --version;
|
||||
|
6
.github/workflows/ci.yaml
vendored
6
.github/workflows/ci.yaml
vendored
@ -5,9 +5,11 @@ on:
|
||||
types: ["opened", "synchronize"]
|
||||
push:
|
||||
branches: ["devel"]
|
||||
env:
|
||||
POETRY_VERSION: 1.4.1
|
||||
jobs:
|
||||
Test:
|
||||
name: Test with Python ${{ matrix.python.version }}
|
||||
name: Python ${{ matrix.python.version }}
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
@ -20,6 +22,8 @@ jobs:
|
||||
toxenv: py39
|
||||
- version: "3.10"
|
||||
toxenv: py310
|
||||
- version: "3.11"
|
||||
toxenv: py311
|
||||
fail-fast: true
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
2
Makefile
2
Makefile
@ -39,5 +39,5 @@ publish: clean test build ## Build and upload to pypi (requires $PYPI_API_KEY be
|
||||
@poetry publish --username __token__ --password $(PYPI_API_KEY)
|
||||
|
||||
dev: ## Create local dev environment
|
||||
poetry install --sync
|
||||
poetry install --sync --with dev --with ci --with test --with security --with static
|
||||
poetry run pre-commit install
|
||||
|
45
tox.ini
45
tox.ini
@ -11,11 +11,8 @@ skip_missing_interpreters = true
|
||||
description = Run the tests
|
||||
require_locked_deps = true
|
||||
require_poetry = true
|
||||
locked_deps =
|
||||
pytest
|
||||
pytest-cov
|
||||
ruamel.yaml
|
||||
toml
|
||||
poetry_dep_groups =
|
||||
test
|
||||
commands =
|
||||
pytest {toxinidir}/tests/ \
|
||||
--cov peewee_plus \
|
||||
@ -26,16 +23,8 @@ commands =
|
||||
description = Static formatting and quality enforcement
|
||||
basepython = python3.10
|
||||
ignore_errors = true
|
||||
locked_deps =
|
||||
black
|
||||
blacken-docs
|
||||
mdformat
|
||||
mdformat-gfm
|
||||
mypy
|
||||
reorder-python-imports
|
||||
pre-commit
|
||||
pre-commit-hooks
|
||||
pylint
|
||||
poetry_dep_groups =
|
||||
static
|
||||
commands =
|
||||
pre-commit run \
|
||||
--all-files
|
||||
@ -49,11 +38,9 @@ commands =
|
||||
description = Static formatting and quality enforcement for the tests
|
||||
basepython = python3.10
|
||||
ignore_errors = true
|
||||
locked_deps =
|
||||
mypy
|
||||
pylint
|
||||
pytest
|
||||
types-toml
|
||||
poetry_dep_groups =
|
||||
static
|
||||
test
|
||||
commands =
|
||||
pylint {toxinidir}/tests/ \
|
||||
--rcfile {toxinidir}/.pylintrc
|
||||
@ -66,10 +53,8 @@ description = Security checks
|
||||
basepython = python3.10
|
||||
skip_install = true
|
||||
ignore_errors = true
|
||||
locked_deps =
|
||||
bandit
|
||||
safety
|
||||
poetry
|
||||
poetry_dep_groups =
|
||||
security
|
||||
commands =
|
||||
bandit {toxinidir}/peewee_plus.py \
|
||||
--recursive \
|
||||
@ -82,7 +67,13 @@ commands =
|
||||
--format requirements.txt \
|
||||
--output {envtmpdir}/requirements.txt \
|
||||
--without-hashes \
|
||||
--dev
|
||||
--with ci \
|
||||
--with test \
|
||||
--with security \
|
||||
--with static \
|
||||
--with dev
|
||||
safety check \
|
||||
--json \
|
||||
--file {envtmpdir}/requirements.txt
|
||||
--file {envtmpdir}/requirements.txt \
|
||||
--output text \
|
||||
# https://github.com/pytest-dev/py/issues/287
|
||||
--ignore 51457
|
||||
|
Loading…
Reference in New Issue
Block a user