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;
|
set -e;
|
||||||
|
|
||||||
CI_CACHE=$HOME/.cache;
|
CI_CACHE=$HOME/.cache;
|
||||||
POETRY_VERSION=1.2.2;
|
INSTALL_POETRY_VERSION="${POETRY_VERSION:-1.4.1}";
|
||||||
|
|
||||||
mkdir --parents "$CI_CACHE";
|
mkdir --parents "$CI_CACHE";
|
||||||
|
|
||||||
@ -26,9 +26,10 @@ poetry --version --no-ansi;
|
|||||||
poetry run pip --version;
|
poetry run pip --version;
|
||||||
|
|
||||||
poetry install \
|
poetry install \
|
||||||
--quiet \
|
--sync \
|
||||||
--remove-untracked \
|
--no-ansi \
|
||||||
--no-ansi;
|
--no-root \
|
||||||
|
--only ci;
|
||||||
|
|
||||||
poetry env info;
|
poetry env info;
|
||||||
poetry run tox --version;
|
poetry run tox --version;
|
||||||
|
6
.github/workflows/ci.yaml
vendored
6
.github/workflows/ci.yaml
vendored
@ -5,9 +5,11 @@ on:
|
|||||||
types: ["opened", "synchronize"]
|
types: ["opened", "synchronize"]
|
||||||
push:
|
push:
|
||||||
branches: ["devel"]
|
branches: ["devel"]
|
||||||
|
env:
|
||||||
|
POETRY_VERSION: 1.4.1
|
||||||
jobs:
|
jobs:
|
||||||
Test:
|
Test:
|
||||||
name: Test with Python ${{ matrix.python.version }}
|
name: Python ${{ matrix.python.version }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@ -20,6 +22,8 @@ jobs:
|
|||||||
toxenv: py39
|
toxenv: py39
|
||||||
- version: "3.10"
|
- version: "3.10"
|
||||||
toxenv: py310
|
toxenv: py310
|
||||||
|
- version: "3.11"
|
||||||
|
toxenv: py311
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- 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)
|
@poetry publish --username __token__ --password $(PYPI_API_KEY)
|
||||||
|
|
||||||
dev: ## Create local dev environment
|
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
|
poetry run pre-commit install
|
||||||
|
45
tox.ini
45
tox.ini
@ -11,11 +11,8 @@ skip_missing_interpreters = true
|
|||||||
description = Run the tests
|
description = Run the tests
|
||||||
require_locked_deps = true
|
require_locked_deps = true
|
||||||
require_poetry = true
|
require_poetry = true
|
||||||
locked_deps =
|
poetry_dep_groups =
|
||||||
pytest
|
test
|
||||||
pytest-cov
|
|
||||||
ruamel.yaml
|
|
||||||
toml
|
|
||||||
commands =
|
commands =
|
||||||
pytest {toxinidir}/tests/ \
|
pytest {toxinidir}/tests/ \
|
||||||
--cov peewee_plus \
|
--cov peewee_plus \
|
||||||
@ -26,16 +23,8 @@ commands =
|
|||||||
description = Static formatting and quality enforcement
|
description = Static formatting and quality enforcement
|
||||||
basepython = python3.10
|
basepython = python3.10
|
||||||
ignore_errors = true
|
ignore_errors = true
|
||||||
locked_deps =
|
poetry_dep_groups =
|
||||||
black
|
static
|
||||||
blacken-docs
|
|
||||||
mdformat
|
|
||||||
mdformat-gfm
|
|
||||||
mypy
|
|
||||||
reorder-python-imports
|
|
||||||
pre-commit
|
|
||||||
pre-commit-hooks
|
|
||||||
pylint
|
|
||||||
commands =
|
commands =
|
||||||
pre-commit run \
|
pre-commit run \
|
||||||
--all-files
|
--all-files
|
||||||
@ -49,11 +38,9 @@ commands =
|
|||||||
description = Static formatting and quality enforcement for the tests
|
description = Static formatting and quality enforcement for the tests
|
||||||
basepython = python3.10
|
basepython = python3.10
|
||||||
ignore_errors = true
|
ignore_errors = true
|
||||||
locked_deps =
|
poetry_dep_groups =
|
||||||
mypy
|
static
|
||||||
pylint
|
test
|
||||||
pytest
|
|
||||||
types-toml
|
|
||||||
commands =
|
commands =
|
||||||
pylint {toxinidir}/tests/ \
|
pylint {toxinidir}/tests/ \
|
||||||
--rcfile {toxinidir}/.pylintrc
|
--rcfile {toxinidir}/.pylintrc
|
||||||
@ -66,10 +53,8 @@ description = Security checks
|
|||||||
basepython = python3.10
|
basepython = python3.10
|
||||||
skip_install = true
|
skip_install = true
|
||||||
ignore_errors = true
|
ignore_errors = true
|
||||||
locked_deps =
|
poetry_dep_groups =
|
||||||
bandit
|
security
|
||||||
safety
|
|
||||||
poetry
|
|
||||||
commands =
|
commands =
|
||||||
bandit {toxinidir}/peewee_plus.py \
|
bandit {toxinidir}/peewee_plus.py \
|
||||||
--recursive \
|
--recursive \
|
||||||
@ -82,7 +67,13 @@ commands =
|
|||||||
--format requirements.txt \
|
--format requirements.txt \
|
||||||
--output {envtmpdir}/requirements.txt \
|
--output {envtmpdir}/requirements.txt \
|
||||||
--without-hashes \
|
--without-hashes \
|
||||||
--dev
|
--with ci \
|
||||||
|
--with test \
|
||||||
|
--with security \
|
||||||
|
--with static \
|
||||||
|
--with dev
|
||||||
safety check \
|
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