Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 96 lines (90 sloc) 2.11 KB
services:
- redis
- postgres
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache"
DATABASE_URL: "postgres://postgres@postgres:5432/postgres"
DJANGO_SETTINGS_MODULE: "config.settings.local"
DJANGO_ALLOWED_HOSTS: "*"
DJANGO_SECURE_SSL_REDIRECT: "False"
SOCIALHOME_DOMAIN: "127.0.0.1:8000"
SOCIALHOME_HTTPS: "False"
DJANGO_DEBUG: "False"
DJANGO_DEBUG_TOOLBAR: "False"
DJANGO_SECRET_KEY: "foobar"
REDIS_HOST: "redis"
REDIS_PORT: "6379"
stages:
- lint
- test_backend
- test_frontend
lint:
stage: lint
image: node:8
cache:
paths:
- node_modules/
- bower_components/
- socialhome/frontend/node_modules/
before_script:
- npm install --ignore-scripts
- node_modules/.bin/bower install --allow-root
- npm i --prefix=socialhome/frontend
script:
- npm run lint
test_backend:
stage: test_backend
image: python:3.6
cache:
paths:
- $PIP_CACHE_DIR/pip
- venv
before_script:
- python -V
- pip install virtualenv
- virtualenv venv
- source venv/bin/activate
- pip install -U pip-tools pip setuptools
- pip-sync dev-requirements.txt
- python manage.py migrate --noinput -v 0
- python manage.py collectstatic --noinput -v 0
- pip freeze
- python manage.py print_settings
script:
- pytest
test_frontend_unit:
stage: test_frontend
environment:
name: production
image: node:8
cache:
paths:
- node_modules/
- bower_components/
- socialhome/frontend/node_modules/
before_script:
- npm install --ignore-scripts
- node_modules/.bin/bower install --allow-root
- npm i --prefix=socialhome/frontend
- npm rebuild node-sass
- npm run build
script:
- npm run test:unit
#
#test_frontend_e2e:
# stage: test_frontend
# environment:
# name: production
# image: cypress/base:8
# cache:
# paths:
# - node_modules/
# - bower_components/
# - socialhome/frontend/node_modules/
# before_script:
# - npm i --ignore-scripts
# - npm i --prefix=socialhome/frontend
# - npm rebuild node-sass
# - npm run build
# script:
# - npm run test:e2e:ci
You can’t perform that action at this time.