Skip to content
Snippets Groups Projects
Commit 503e749d authored by vlorentz's avatar vlorentz
Browse files

Apply copier template v0.2.0

parent 7882a486
No related branches found
No related tags found
1 merge request!430Apply copier template v0.2.0
Pipeline #7979 passed
# Changes here will be overwritten by Copier
_commit: v0.1.6
_commit: v0.2.0
_src_path: https://gitlab.softwareheritage.org/swh/devel/swh-py-template.git
description: Software Heritage deposit server
distribution_name: swh-deposit
......
......@@ -44,4 +44,13 @@ repos:
pass_filenames: false
language: system
types: [python]
- id: twine-check
name: twine check
description: call twine check when pushing an annotated release tag
entry: bash -c "ref=$(git describe) &&
[[ $ref =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] &&
(python3 -m build --sdist && twine check $(ls -t dist/* | head -1)) || true"
pass_filenames: false
stages: [pre-push]
language: python
additional_dependencies: [twine, build]
[pytest]
# Remove the pytest_swh_* entries when they stop getting imported automatically
addopts = --import-mode=importlib --ignore=swh/deposit/settings -p no:flask -p no:pytest_swh_scheduler -p no:pytest_swh_storage -p no:pytest_swh_core
addopts = --ignore=swh/deposit/settings -p no:flask -p no:pytest_swh_scheduler -p no:pytest_swh_storage -p no:pytest_swh_core
norecursedirs = build docs .*
asyncio_mode = strict
......@@ -9,3 +9,4 @@ markers =
db: execute tests using a postgresql database
fs: execute tests using the filesystem
consider_namespace_packages = true
......@@ -8,6 +8,7 @@ envlist =
py3-django3
[testenv]
usedevelop = true
extras =
testing
deps =
......@@ -17,15 +18,10 @@ deps =
django3: Django>=3,<4
commands =
pytest --doctest-modules \
--rootdir {envsitepackagesdir} \
--cov={envsitepackagesdir}/swh/deposit \
--cov=swh/deposit \
--cov-branch \
--ignore {envsitepackagesdir}/swh/deposit/settings/ \
{envsitepackagesdir}/swh/deposit \
swh/deposit \
{posargs}
# --rootdir (with --import-mode from pytest.ini) are required to make tests
# that depends on the test file to be a proper submodule of the swh namespace
# after migration to PEP420 (implicit namespace).
[testenv:black]
skip_install = true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment