Skip to content

Commit 8faa68a

Browse files
committed
.gitlab-ci.yml: python: parallel unit tests
1 parent a88c6a8 commit 8faa68a

File tree

2 files changed

+63
-104
lines changed

2 files changed

+63
-104
lines changed

.gitlab-ci.manager.yml

-90
This file was deleted.

.gitlab-ci.yml

+63-14
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# SPDX-License-Identifier: GPL-3.0-or-later
22
# vim:foldmethod=marker
33
variables:
4+
PYTHON_VERSION: '3.12'
45
DEBIAN_FRONTEND: noninteractive
56
LC_ALL: C.UTF-8
67
GIT_SUBMODULE_STRATEGY: recursive
@@ -472,20 +473,6 @@ test:valgrind:
472473
--wrap="valgrind --leak-check=full --trace-children=yes --quiet --suppressions=/lj.supp"
473474
--suite snowflake
474475
475-
manager:
476-
stage: test
477-
needs: []
478-
trigger:
479-
include: .gitlab-ci.manager.yml
480-
strategy: depend
481-
except:
482-
refs:
483-
- master@knot/knot-resolver
484-
- master@knot/security/knot-resolver
485-
- tags
486-
variables:
487-
- $SKIP_CI == "1"
488-
489476
pytests:
490477
<<: *test_flaky
491478
needs:
@@ -877,3 +864,65 @@ docs:website:
877864
- "git push --force --set-upstream origin \"docs/${CI_COMMIT_REF_NAME}\""
878865

879866
# }}}
867+
868+
# docs: {{{
869+
870+
.python: &python
871+
<<: *nodep
872+
image: $IMAGE_PREFIX/manager:$IMAGE_TAG
873+
stage: sanity
874+
before_script:
875+
- poetry --version
876+
- poetry env use python${PYTHON_VERSION}
877+
878+
python:examples:
879+
<<: *python
880+
script:
881+
- poetry install --all-extras --only main,dev
882+
- poe examples
883+
884+
python:check:
885+
<<: *python
886+
script:
887+
- poetry install --all-extras --only main,dev,lint
888+
- poe check
889+
890+
python:format:
891+
<<: *python
892+
script:
893+
- poetry install --all-extras --only main,dev,lint
894+
- poe format
895+
896+
python:lint:
897+
<<: *python
898+
script:
899+
- poetry install --all-extras --only main,dev,lint
900+
- poe lint
901+
902+
python:unit:
903+
<<: *python
904+
stage: test
905+
parallel:
906+
matrix:
907+
- PYTHON_VERSION:
908+
- '3.8'
909+
- '3.9'
910+
- '3.10'
911+
- '3.11'
912+
- '3.12'
913+
- '3.13'
914+
script:
915+
- poetry install --all-extras --only main,dev,test
916+
- poe test
917+
# the following command makes sure that the source root of the coverage file is at $gitroot
918+
- poetry run bash -c "coverage combine .coverage; coverage xml"
919+
artifacts:
920+
reports:
921+
coverage_report:
922+
coverage_format: cobertura
923+
path: coverage.xml
924+
junit: unit.junit.xml
925+
paths:
926+
- unit.junit.xml
927+
928+
# }}}

0 commit comments

Comments
 (0)