From 519eac8f258feac34e993cacd5ae6949d4db5a49 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Tue, 21 Dec 2021 22:58:04 +0100 Subject: [PATCH] feat(ci): Added pipeline for tests Add all supported, meaning by flaschengeist, python versions. Use slim image of python instead of alpine, because Pillow does not provide any wheels for musllibc --- .woodpecker/lint.yml | 2 +- .woodpecker/test.yml | 21 +++++++++++++++++++++ setup.cfg | 6 ++++-- 3 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 .woodpecker/test.yml diff --git a/.woodpecker/lint.yml b/.woodpecker/lint.yml index 0be3525..3116a12 100644 --- a/.woodpecker/lint.yml +++ b/.woodpecker/lint.yml @@ -1,6 +1,6 @@ pipeline: lint: - image: python:alpine + image: python:slim commands: - pip install black - black --check --line-length 120 --target-version=py37 . diff --git a/.woodpecker/test.yml b/.woodpecker/test.yml new file mode 100644 index 0000000..a496f9c --- /dev/null +++ b/.woodpecker/test.yml @@ -0,0 +1,21 @@ +pipeline: + install: + image: python:${PYTHON}-slim + commands: + - python -m venv --clear venv + - export PATH=venv/bin:$PATH + - python -m pip install --upgrade pip + - pip install -v ".[tests]" + test: + image: python:${PYTHON}-slim + commands: + - export PATH=venv/bin:$PATH + - python -m pytest + + +matrix: + PYTHON: + - 3.10 + - 3.9 + - 3.8 + - 3.7 diff --git a/setup.cfg b/setup.cfg index 982d0ab..6d533e9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -29,13 +29,15 @@ install_requires = sqlalchemy>=1.4.26 toml werkzeug - PyMySQL;platform_system=='Windows' - mysqlclient;platform_system!='Windows' + [options.extras_require] argon = argon2-cffi ldap = flask_ldapconn; ldap3 tests = pytest; pytest-depends; coverage +mysql = + PyMySQL;platform_system=='Windows' + mysqlclient;platform_system!='Windows' [options.package_data] * = *.toml