diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1c83ae1fbb1a304582a2e4908e0f108714331457..d5a5513d8ce621fea2dde3f8c31354caa2442e52 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,6 +13,8 @@ build: - docker login -u gitlab-ci-token -p "$CI_JOB_TOKEN" "$CI_REGISTRY" - docker push "$CI_REGISTRY_IMAGE/qbcontainer" + + lint: stage: test tags: @@ -32,11 +34,23 @@ type-checking: - python3 -m mypy --install-types --non-interactive querybuilder/ test: + services: + - postgres + variables: + POSTGRES_DB: custom_db + POSTGRES_USER: custom_user + POSTGRES_PASSWORD: custom_pass + image: postgres + script: stage: test tags: - ci.inria.fr - medium image: "$CI_REGISTRY_IMAGE/qbcontainer" script: - - pytest --doctest-modules --cov=querybuilder querybuilder + - export PGPASSWORD=$POSTGRES_PASSWORD + - export PGHOST="postgres" + - export PGDATABASE=$POSTGRES_DB + - export PGUSER=$POSTGRES_USER + - pytest --doctest-modules --cov=querybuilder coverage: '/TOTAL.*\s+(\d+%)$/' diff --git a/readme_doctests.py b/doctest/readme_doctests.py similarity index 100% rename from readme_doctests.py rename to doctest/readme_doctests.py