Skip to content
Snippets Groups Projects
Commit 76f9ea64 authored by David Douard's avatar David Douard
Browse files

Apply swh-py-template v0.2.0

parent 4319f69e
No related branches found
No related tags found
No related merge requests found
# 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 core utilities
distribution_name: swh-core
......
......@@ -42,4 +42,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]
norecursedirs = build docs .*
asyncio_mode = strict
consider_namespace_packages = true
filterwarnings =
ignore:.*uses the 'db_with_data' fixture
consider_namespace_packages = true
......@@ -7,6 +7,7 @@ envlist =
py3-{core,db,server,github}
[testenv]
usedevelop = true
passenv = PYTHONASYNCIODEBUG
extras =
testing-core
......@@ -17,17 +18,13 @@ deps =
cover: pytest-cov
commands =
pytest --doctest-modules \
--rootdir {envsitepackagesdir} \
slow: --hypothesis-profile=slow \
cover: --cov={envsitepackagesdir}/swh/core --cov-branch \
core: {envsitepackagesdir}/swh/core/tests \
db: {envsitepackagesdir}/swh/core/db/tests \
server: {envsitepackagesdir}/swh/core/api/tests \
github: {envsitepackagesdir}/swh/core/github/tests \
{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).
slow: --hypothesis-profile=slow \
cover: --cov=swh/core --cov-branch \
core: swh/core/tests \
db: swh/core/db/tests \
server: swh/core/api/tests \
github: swh/core/github/tests \
{posargs}
[testenv:py3{,7,8,9,10,11,12,13},pypy3{,7,8,9,10,11,12,13}]
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