Commit d71eed32 authored by Arkadiusz Hiler's avatar Arkadiusz Hiler

test

parent ff91eb8a
Pipeline #1146 failed with stage
in 8 minutes and 35 seconds
...@@ -16,6 +16,7 @@ tags ...@@ -16,6 +16,7 @@ tags
TAGS TAGS
!.gitignore !.gitignore
!.travis.yml !.travis.yml
!.gitlab-ci.yml
# configuration files # configuration files
patchwork/settings/production.py patchwork/settings/production.py
......
image: python:3.6
services:
- mariadb:latest
variables:
SELENIUM_BROWSER: 'firefox'
PW_TEST_DB_HOST: 'mariadb'
PW_TEST_DB_USER: 'root'
MYSQL_DATABASE: 'patchwork'
MYSQL_ROOT_PASSWORD: 'password'
before_script:
- apt-get --yes update -qq
- apt-get -qq --yes install --no-install-recommends apt-utils
- apt-get -qq --yes install firefox-esr libmariadbclient-dev xvfb
- apt-get -qq --yes install python-virtualenv python3-virtualenv python-pip python3-pip
- curl -sL https://deb.nodesource.com/setup_8.x | bash -
- apt-get install -y nodejs
- npm install -g jshint jasmine-core karma karma-jasmine karma-firefox-launcher
- curl -OL https://github.com/mozilla/geckodriver/releases/download/v0.20.1/geckodriver-v0.20.1-linux64.tar.gz
- mkdir geckodriver
- tar -xzf geckodriver-v0.20.1-linux64.tar.gz -C geckodriver
- export PATH=$PATH:$PWD/geckodriver
test:
script:
- python3 -V
- python2 -V
- npm --version
- firefox --version
- geckodriver --version
- xvfb-run ./tests/test_all.sh
...@@ -28,7 +28,7 @@ DEBUG = True ...@@ -28,7 +28,7 @@ DEBUG = True
DATABASES = { DATABASES = {
'default': { 'default': {
'ENGINE': 'django.db.backends.mysql', 'ENGINE': 'django.db.backends.mysql',
'HOST': 'localhost', 'HOST': os.getenv('PW_TEST_DB_HOST', 'localhost'),
'PORT': '', 'PORT': '',
'USER': os.getenv('PW_TEST_DB_USER', 'patchwork'), 'USER': os.getenv('PW_TEST_DB_USER', 'patchwork'),
'PASSWORD': os.getenv('PW_TEST_DB_PASS', 'password'), 'PASSWORD': os.getenv('PW_TEST_DB_PASS', 'password'),
......
...@@ -12,8 +12,8 @@ setenv = ...@@ -12,8 +12,8 @@ setenv =
DJANGO_SETTINGS_MODULE = patchwork.settings.dev DJANGO_SETTINGS_MODULE = patchwork.settings.dev
passenv = passenv =
http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
PW_TEST_DB_TYPE PW_TEST_DB_USER PW_TEST_DB_PASS DISPLAY PW_TEST_DB_HOST PW_TEST_DB_TYPE PW_TEST_DB_USER PW_TEST_DB_PASS
PATCHWORK_SKIP_BROWSER_TESTS SELENIUM_BROWSER DISPLAY PATCHWORK_SKIP_BROWSER_TESTS SELENIUM_BROWSER
commands = commands =
{toxinidir}/manage.py test --noinput '{posargs:patchwork}' {toxinidir}/manage.py test --noinput '{posargs:patchwork}'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment