diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0c6d979c174d20f6faf3a012599af0bb598adeb3..6ee8ba7be69fa0db30107c5a46762742ecce7c5c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,11 +1,17 @@ image: docker:latest +variables: + POSTGRES_HOST: "db-local" + POSTGRES_DBNAME: "postgres" + POSTGRES_USER: "postgres" + POSTGRES_PASSWORD: "test" + stages: - test test-style: stage: test - needs: [] + image: python:3.9 script: - pip install -q -r requirements-test.txt - black ./autocomplete_multi_models/ --check --diff --config ./pyproject.toml @@ -13,6 +19,9 @@ test-style: test: stage: test image: python:3.9 + services: + - name: postgres:14 + alias: "db-local" script: - - pip3 install -r requirements.txt -r requirements-test.txt + - pip install -r requirements.txt -r requirements-test.txt - coverage report --skip-covered --omit=*/wsgi.py,*/asgi.py,manage.py,*/apps.py,setup.py