chore: update pipeline image
This commit is contained in:
parent
4cbe50253a
commit
d7fc6718a9
5 changed files with 297 additions and 22 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -11,3 +11,4 @@
|
||||||
*.egg-info
|
*.egg-info
|
||||||
*.pyc
|
*.pyc
|
||||||
__pycache__/
|
__pycache__/
|
||||||
|
/test-reports/
|
||||||
|
|
|
||||||
5
Makefile
5
Makefile
|
|
@ -2,11 +2,14 @@
|
||||||
|
|
||||||
all: chore
|
all: chore
|
||||||
|
|
||||||
chore: requirements.txt requirements-dev.txt
|
chore: requirements.txt requirements-dev.txt bitbucket-pipelines.yaml
|
||||||
|
|
||||||
Pipfile.lock: Pipfile
|
Pipfile.lock: Pipfile
|
||||||
python3 -m pipenv lock -v
|
python3 -m pipenv lock -v
|
||||||
|
|
||||||
|
bitbucket-pipelines.yml: bitbucket-pipelines.yml.m4
|
||||||
|
m4 $@.m4 > $@
|
||||||
|
|
||||||
requirements-dev.txt: Pipfile.lock
|
requirements-dev.txt: Pipfile.lock
|
||||||
python3 -m pipenv requirements --exclude-markers --dev-only > requirements-dev.txt
|
python3 -m pipenv requirements --exclude-markers --dev-only > requirements-dev.txt
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
image: administratrix/cicd:latest
|
image: byteb4rb1e/build-python313
|
||||||
definitions:
|
definitions:
|
||||||
caches:
|
caches:
|
||||||
venv:
|
venv:
|
||||||
|
|
@ -24,20 +24,20 @@ definitions:
|
||||||
script:
|
script:
|
||||||
- .venv/bin/python3 -m pipenv run make test-reports/static
|
- .venv/bin/python3 -m pipenv run make test-reports/static
|
||||||
- step: &test-unit
|
- step: &test-unit
|
||||||
name: test-unit
|
|
||||||
caches:
|
|
||||||
- venv
|
|
||||||
artifacts:
|
artifacts:
|
||||||
- test-reports/*
|
- test-reports/*
|
||||||
script:
|
script:
|
||||||
|
- python3 -m venv --system-site-packages .venv
|
||||||
|
- .venv/bin/python3 -m pip install pipenv
|
||||||
|
- .venv/bin/python3 -m pipenv run sh configure
|
||||||
- .venv/bin/python3 -m pipenv run make test-reports/unit
|
- .venv/bin/python3 -m pipenv run make test-reports/unit
|
||||||
- step: &test-integration
|
- step: &test-integration
|
||||||
name: test-integration
|
|
||||||
caches:
|
|
||||||
- venv
|
|
||||||
artifacts:
|
artifacts:
|
||||||
- test-reports/*
|
- test-reports/*
|
||||||
script:
|
script:
|
||||||
|
- python3 -m venv --system-site-packages .venv
|
||||||
|
- .venv/bin/python3 -m pip install pipenv
|
||||||
|
- .venv/bin/python3 -m pipenv run sh configure
|
||||||
- .venv/bin/python3 -m pipenv run make test-reports/integration
|
- .venv/bin/python3 -m pipenv run make test-reports/integration
|
||||||
- step: &doc
|
- step: &doc
|
||||||
name: doc
|
name: doc
|
||||||
|
|
@ -57,6 +57,22 @@ definitions:
|
||||||
script:
|
script:
|
||||||
- make clean
|
- make clean
|
||||||
- .venv/bin/python3 -m pipenv run make dist
|
- .venv/bin/python3 -m pipenv run make dist
|
||||||
|
- step: &publish
|
||||||
|
name: publish
|
||||||
|
caches:
|
||||||
|
- venv
|
||||||
|
artifacts:
|
||||||
|
- dist/*
|
||||||
|
script:
|
||||||
|
- echo "publish"
|
||||||
|
- step: &archive
|
||||||
|
name: archive
|
||||||
|
caches:
|
||||||
|
- venv
|
||||||
|
artifacts:
|
||||||
|
- dist/*
|
||||||
|
script:
|
||||||
|
- echo "archive"
|
||||||
- step: &chore
|
- step: &chore
|
||||||
name: chore
|
name: chore
|
||||||
caches:
|
caches:
|
||||||
|
|
@ -85,24 +101,103 @@ pipelines:
|
||||||
- step: *test-static
|
- step: *test-static
|
||||||
- step: *dist
|
- step: *dist
|
||||||
branches:
|
branches:
|
||||||
dev:
|
|
||||||
- step: *configure
|
|
||||||
- parallel:
|
|
||||||
steps:
|
|
||||||
- step: *test-static
|
|
||||||
- step: *test-unit
|
|
||||||
- step: *test-integration
|
|
||||||
- parallel:
|
|
||||||
steps:
|
|
||||||
- step: *doc
|
|
||||||
- step: *dist
|
|
||||||
master:
|
master:
|
||||||
- step: *configure
|
- step: *configure
|
||||||
- parallel:
|
- parallel:
|
||||||
steps:
|
steps:
|
||||||
- step: *test-static
|
- step: *test-static
|
||||||
- step: *test-unit
|
- step:
|
||||||
- step: *test-integration
|
<<: *test-unit
|
||||||
|
image: byteb4rb1e/build-python39
|
||||||
|
name: test-unit-python39
|
||||||
|
- step:
|
||||||
|
<<: *test-unit
|
||||||
|
image: byteb4rb1e/build-python310
|
||||||
|
name: test-unit-python310
|
||||||
|
- step:
|
||||||
|
<<: *test-unit
|
||||||
|
image: byteb4rb1e/build-python311
|
||||||
|
name: test-unit-python311
|
||||||
|
- step:
|
||||||
|
<<: *test-unit
|
||||||
|
image: byteb4rb1e/build-python312
|
||||||
|
name: test-unit-python312
|
||||||
|
- step:
|
||||||
|
<<: *test-unit
|
||||||
|
image: byteb4rb1e/build-python313
|
||||||
|
name: test-unit-python313
|
||||||
|
- step:
|
||||||
|
<<: *test-integration
|
||||||
|
image: byteb4rb1e/build-python39
|
||||||
|
name: test-integration-python39
|
||||||
|
- step:
|
||||||
|
<<: *test-integration
|
||||||
|
image: byteb4rb1e/build-python310
|
||||||
|
name: test-integration-python310
|
||||||
|
- step:
|
||||||
|
<<: *test-integration
|
||||||
|
image: byteb4rb1e/build-python311
|
||||||
|
name: test-integration-python311
|
||||||
|
- step:
|
||||||
|
<<: *test-integration
|
||||||
|
image: byteb4rb1e/build-python312
|
||||||
|
name: test-integration-python312
|
||||||
|
- step:
|
||||||
|
<<: *test-integration
|
||||||
|
image: byteb4rb1e/build-python313
|
||||||
|
name: test-integration-python313
|
||||||
|
- step: *dist
|
||||||
|
- step: *archive
|
||||||
|
- parallel:
|
||||||
|
steps:
|
||||||
|
- step: *doc
|
||||||
|
- step: *publish
|
||||||
|
pullrequests:
|
||||||
|
"{master,dev}":
|
||||||
|
- step: *configure
|
||||||
|
- parallel:
|
||||||
|
steps:
|
||||||
|
- step: *test-static
|
||||||
|
- step:
|
||||||
|
<<: *test-unit
|
||||||
|
image: byteb4rb1e/build-python39
|
||||||
|
name: test-unit-python39
|
||||||
|
- step:
|
||||||
|
<<: *test-unit
|
||||||
|
image: byteb4rb1e/build-python310
|
||||||
|
name: test-unit-python310
|
||||||
|
- step:
|
||||||
|
<<: *test-unit
|
||||||
|
image: byteb4rb1e/build-python311
|
||||||
|
name: test-unit-python311
|
||||||
|
- step:
|
||||||
|
<<: *test-unit
|
||||||
|
image: byteb4rb1e/build-python312
|
||||||
|
name: test-unit-python312
|
||||||
|
- step:
|
||||||
|
<<: *test-unit
|
||||||
|
image: byteb4rb1e/build-python313
|
||||||
|
name: test-unit-python313
|
||||||
|
- step:
|
||||||
|
<<: *test-integration
|
||||||
|
image: byteb4rb1e/build-python39
|
||||||
|
name: test-integration-python39
|
||||||
|
- step:
|
||||||
|
<<: *test-integration
|
||||||
|
image: byteb4rb1e/build-python310
|
||||||
|
name: test-integration-python310
|
||||||
|
- step:
|
||||||
|
<<: *test-integration
|
||||||
|
image: byteb4rb1e/build-python311
|
||||||
|
name: test-integration-python311
|
||||||
|
- step:
|
||||||
|
<<: *test-integration
|
||||||
|
image: byteb4rb1e/build-python312
|
||||||
|
name: test-integration-python312
|
||||||
|
- step:
|
||||||
|
<<: *test-integration
|
||||||
|
image: byteb4rb1e/build-python313
|
||||||
|
name: test-integration-python313
|
||||||
- parallel:
|
- parallel:
|
||||||
steps:
|
steps:
|
||||||
- step: *doc
|
- step: *doc
|
||||||
|
|
|
||||||
166
bitbucket-pipelines.yml.m4
Normal file
166
bitbucket-pipelines.yml.m4
Normal file
|
|
@ -0,0 +1,166 @@
|
||||||
|
image: byteb4rb1e/build-python313
|
||||||
|
define(`bootstrappipenv', patsubst(
|
||||||
|
`- python3 -m venv --system-site-packages .venv
|
||||||
|
- .venv/bin/python3 -m pip install pipenv', `^', $1))dnl
|
||||||
|
definitions:
|
||||||
|
caches:
|
||||||
|
venv:
|
||||||
|
path: .venv
|
||||||
|
steps:
|
||||||
|
- step: &configure
|
||||||
|
name: configure
|
||||||
|
caches:
|
||||||
|
- venv
|
||||||
|
artifacts:
|
||||||
|
- config.log
|
||||||
|
- config.status
|
||||||
|
script:
|
||||||
|
bootstrappipenv(` ')
|
||||||
|
- .venv/bin/python3 -m pipenv run sh configure
|
||||||
|
- step: &test-static
|
||||||
|
name: test-static
|
||||||
|
caches:
|
||||||
|
- venv
|
||||||
|
artifacts:
|
||||||
|
- test-reports/*
|
||||||
|
script:
|
||||||
|
- .venv/bin/python3 -m pipenv run make test-reports/static
|
||||||
|
- step: &test-unit
|
||||||
|
artifacts:
|
||||||
|
- test-reports/*
|
||||||
|
script:
|
||||||
|
bootstrappipenv(` ')
|
||||||
|
- .venv/bin/python3 -m pipenv run sh configure
|
||||||
|
- .venv/bin/python3 -m pipenv run make test-reports/unit
|
||||||
|
- step: &test-integration
|
||||||
|
artifacts:
|
||||||
|
- test-reports/*
|
||||||
|
script:
|
||||||
|
bootstrappipenv(` ')
|
||||||
|
- .venv/bin/python3 -m pipenv run sh configure
|
||||||
|
- .venv/bin/python3 -m pipenv run make test-reports/integration
|
||||||
|
- step: &doc
|
||||||
|
name: doc
|
||||||
|
caches:
|
||||||
|
- venv
|
||||||
|
artifacts:
|
||||||
|
- build/doc/**
|
||||||
|
script:
|
||||||
|
- make clean
|
||||||
|
- .venv/bin/python3 -m pipenv run make build/doc
|
||||||
|
- step: &dist
|
||||||
|
name: dist
|
||||||
|
caches:
|
||||||
|
- venv
|
||||||
|
artifacts:
|
||||||
|
- dist/*
|
||||||
|
script:
|
||||||
|
- make clean
|
||||||
|
- .venv/bin/python3 -m pipenv run make dist
|
||||||
|
- step: &publish
|
||||||
|
name: publish
|
||||||
|
caches:
|
||||||
|
- venv
|
||||||
|
artifacts:
|
||||||
|
- dist/*
|
||||||
|
script:
|
||||||
|
- echo "publish"
|
||||||
|
- step: &archive
|
||||||
|
name: archive
|
||||||
|
caches:
|
||||||
|
- venv
|
||||||
|
artifacts:
|
||||||
|
- dist/*
|
||||||
|
script:
|
||||||
|
- echo "archive"
|
||||||
|
- step: &chore
|
||||||
|
name: chore
|
||||||
|
caches:
|
||||||
|
- venv
|
||||||
|
artifacts:
|
||||||
|
- requirements.txt
|
||||||
|
- requirements-dev.txt
|
||||||
|
- Pipfile.lock
|
||||||
|
script:
|
||||||
|
- make clean
|
||||||
|
- .venv/bin/python3 -m pipenv run make chore
|
||||||
|
# TODO: this is good, but rather useless yet as the chore
|
||||||
|
# target only regenerates requirements.txt and
|
||||||
|
# requirements-dev.txt from Pipfile.lock, but it does not test
|
||||||
|
# the sync between Pipfile and Pipfile.lock, as the locking
|
||||||
|
# mechanism of pipenv currently is platform-dependent, i.e., it
|
||||||
|
# is not possible to define a minimum Python version and expect
|
||||||
|
# pipenv to find the right versions of dependencies compatible
|
||||||
|
# with all specified platforms.
|
||||||
|
# - git diff --exit-code
|
||||||
|
undefine(`bootstrappipenv')dnl
|
||||||
|
define(`allteststeps', patsubst(
|
||||||
|
`- parallel:
|
||||||
|
steps:
|
||||||
|
- step: *test-static
|
||||||
|
- step:
|
||||||
|
<<: *test-unit
|
||||||
|
image: byteb4rb1e/build-python39
|
||||||
|
name: test-unit-python39
|
||||||
|
- step:
|
||||||
|
<<: *test-unit
|
||||||
|
image: byteb4rb1e/build-python310
|
||||||
|
name: test-unit-python310
|
||||||
|
- step:
|
||||||
|
<<: *test-unit
|
||||||
|
image: byteb4rb1e/build-python311
|
||||||
|
name: test-unit-python311
|
||||||
|
- step:
|
||||||
|
<<: *test-unit
|
||||||
|
image: byteb4rb1e/build-python312
|
||||||
|
name: test-unit-python312
|
||||||
|
- step:
|
||||||
|
<<: *test-unit
|
||||||
|
image: byteb4rb1e/build-python313
|
||||||
|
name: test-unit-python313
|
||||||
|
- step:
|
||||||
|
<<: *test-integration
|
||||||
|
image: byteb4rb1e/build-python39
|
||||||
|
name: test-integration-python39
|
||||||
|
- step:
|
||||||
|
<<: *test-integration
|
||||||
|
image: byteb4rb1e/build-python310
|
||||||
|
name: test-integration-python310
|
||||||
|
- step:
|
||||||
|
<<: *test-integration
|
||||||
|
image: byteb4rb1e/build-python311
|
||||||
|
name: test-integration-python311
|
||||||
|
- step:
|
||||||
|
<<: *test-integration
|
||||||
|
image: byteb4rb1e/build-python312
|
||||||
|
name: test-integration-python312
|
||||||
|
- step:
|
||||||
|
<<: *test-integration
|
||||||
|
image: byteb4rb1e/build-python313
|
||||||
|
name: test-integration-python313', `^', $1))dnl
|
||||||
|
pipelines:
|
||||||
|
default:
|
||||||
|
- step: *configure
|
||||||
|
- parallel:
|
||||||
|
steps:
|
||||||
|
- step: *test-static
|
||||||
|
- step: *dist
|
||||||
|
branches:
|
||||||
|
master:
|
||||||
|
- step: *configure
|
||||||
|
allteststeps(` ')
|
||||||
|
- step: *dist
|
||||||
|
- step: *archive
|
||||||
|
- parallel:
|
||||||
|
steps:
|
||||||
|
- step: *doc
|
||||||
|
- step: *publish
|
||||||
|
pullrequests:
|
||||||
|
"{master,dev}":
|
||||||
|
- step: *configure
|
||||||
|
allteststeps(` ')
|
||||||
|
- parallel:
|
||||||
|
steps:
|
||||||
|
- step: *doc
|
||||||
|
- step: *dist
|
||||||
|
undefine(`allteststeps')dnl
|
||||||
24
tox.ini
24
tox.ini
|
|
@ -6,7 +6,6 @@ env_list =
|
||||||
py3{8-12}-sphinx{5-8}-{integration}
|
py3{8-12}-sphinx{5-8}-{integration}
|
||||||
lint
|
lint
|
||||||
format
|
format
|
||||||
audit
|
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
deps =
|
deps =
|
||||||
|
|
@ -23,7 +22,7 @@ commands =
|
||||||
|
|
||||||
[testenv:audit]
|
[testenv:audit]
|
||||||
description = run type check on code base
|
description = run type check on code base
|
||||||
labels = static
|
labels = audit
|
||||||
deps =
|
deps =
|
||||||
pip-audit
|
pip-audit
|
||||||
commands =
|
commands =
|
||||||
|
|
@ -38,15 +37,16 @@ commands =
|
||||||
autopep8 --recursive --diff --exit-code src/
|
autopep8 --recursive --diff --exit-code src/
|
||||||
autopep8 --recursive --diff --exit-code tests/
|
autopep8 --recursive --diff --exit-code tests/
|
||||||
|
|
||||||
[testenv:py3{8-13}-unit]
|
[testenv:py3{9-13}-unit]
|
||||||
description = run type check on code base
|
description = run type check on code base
|
||||||
labels = unit
|
labels = unit
|
||||||
deps =
|
deps =
|
||||||
{[testenv]deps}
|
{[testenv]deps}
|
||||||
|
pytest
|
||||||
commands =
|
commands =
|
||||||
python3 -m unittest discover tests/unit
|
pytest tests/unit --junitxml=test-reports/{env_name}.xml
|
||||||
|
|
||||||
[testenv:py3{8-13}-sphinx{5-8}-integration]
|
[testenv:py3{9-13}-sphinx{5-7}-integration]
|
||||||
description = run type check on code base
|
description = run type check on code base
|
||||||
labels = integration
|
labels = integration
|
||||||
deps =
|
deps =
|
||||||
|
|
@ -54,6 +54,16 @@ deps =
|
||||||
sphinx5: sphinx>=5.0,<=6.0
|
sphinx5: sphinx>=5.0,<=6.0
|
||||||
sphinx6: sphinx>=6.0,<=7.0
|
sphinx6: sphinx>=6.0,<=7.0
|
||||||
sphinx7: sphinx>=7.0,<=8.0
|
sphinx7: sphinx>=7.0,<=8.0
|
||||||
sphinx8: sphinx>=8.0,<=9.0
|
pytest
|
||||||
commands =
|
commands =
|
||||||
python3 -m unittest discover tests/integration
|
pytest tests/integration --junitxml=test-reports/{env_name}.xml
|
||||||
|
|
||||||
|
[testenv:py3{10-13}-sphinx8-integration]
|
||||||
|
description = run type check on code base
|
||||||
|
labels = integration
|
||||||
|
deps =
|
||||||
|
{[testenv]deps}
|
||||||
|
sphinx8: sphinx>=8.0,<=9.0
|
||||||
|
pytest
|
||||||
|
commands =
|
||||||
|
pytest tests/integration --junitxml=test-reports/{env_name}.xml
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue