Gitlab Community Edition Instance

Skip to content
Snippets Groups Projects
Commit fd9b7c2b authored by Robin Hundt's avatar Robin Hundt Committed by Dominik Seeger
Browse files

Tests are now run in parallel

parent e5f1cf15
Branches parallel-test
No related tags found
No related merge requests found
Pipeline #156416 failed
......@@ -23,7 +23,7 @@ include:
cache:
key: "pip-cache"
paths:
- "$PIP_CACHE_DIR"
- ".pipenv"
# ========================== Build Testing section =========================== #
build_test_env:
......@@ -114,7 +114,7 @@ test_pytest:
services:
- postgres:9.6
script:
- pytest --cov --ds=grady.settings.test core/tests
- pytest -n auto -v --cov --ds=grady.settings.test core/tests
artifacts:
paths:
- .coverage
......@@ -157,7 +157,7 @@ test_frontend:
- cp frontend/dist/index.html core/templates
- python util/format_index.py
- python manage.py collectstatic --no-input
- HEADLESS_TESTS=True pytest --ds=grady.settings.test functional_tests
- HEADLESS_TESTS=True pytest -n auto -v --ds=grady.settings.test functional_tests
artifacts:
paths:
- functional_tests/screenshots/
......
......@@ -22,10 +22,10 @@ test:
pytest --ds=grady.settings core/tests
teste2e:
cd frontend && yarn build && cp dist/index.html ../core/templates && cd .. && python util/format_index.py && python manage.py collectstatic --no-input && HEADLESS_TESTS=$(headless) pytest --ds=grady.settings $(path); git checkout core/templates/index.html
cd frontend && yarn build && cp dist/index.html ../core/templates && cd .. && python util/format_index.py && python manage.py collectstatic --no-input && HEADLESS_TESTS=$(headless) pytest -n auto -v --ds=grady.settings $(path); git checkout core/templates/index.html
teste2e-nc:
cp frontend/dist/index.html ./core/templates && python util/format_index.py && python manage.py collectstatic --no-input && HEADLESS_TESTS=$(headless) pytest --ds=grady.settings $(path); git checkout core/templates/index.html
cp frontend/dist/index.html ./core/templates && python util/format_index.py && python manage.py collectstatic --no-input && HEADLESS_TESTS=$(headless) pytest -n auto -v --ds=grady.settings $(path); git checkout core/templates/index.html
coverage:
......
......@@ -8,11 +8,12 @@ flake8 = "~=3.8.3"
pre-commit = "~=1.13.0"
pytest = "~=6.1.0"
pytest-cov = "~=2.10.1"
pytest-xdist = "~=2.1.0"
pytest-django = "~=3.10.0"
selenium = "~=3.141.0"
factory-boy = "~=3.0.1"
Faker = "~=4.1.3"
pytest-xdist = "~=2.1.0"
pytest-rerunfailures = "~=9.1"
[packages]
pyzmq = "~=19.0.2"
......@@ -35,6 +36,5 @@ Django = "~=3.1.1"
nbformat = "~=5.0.7"
nbconvert = "~=6.0.6"
[requires]
python_version = "3.8"
This diff is collapsed.
......@@ -82,7 +82,7 @@ pipenv shell
4. Set up a Postgres 9.5 database. If you have docker installed the
easiest way is to just run it in a docker container, like this:
```shell script
docker run -d --rm --name postgres -p 5432:5432 postgres:9.5
docker run -d --name postgres -p 5432:5432 -e POSTGRES_PASSWORD=password postgres:9.6
```
......
......@@ -93,7 +93,7 @@ DATABASES = {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': os.environ.get('DB_NAME', 'postgres'),
'USER': os.environ.get('DB_USER', 'postgres'),
'PASSWORD': os.environ.get('DB_PASSWORD', 'postgres'),
'PASSWORD': os.environ.get('DB_PASSWORD', 'password'),
'HOST': os.environ.get('DB_HOST', 'localhost'),
'PORT': os.environ.get('DB_PORT', '5432'),
'ATOMIC_REQUESTS': 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