2018-08-08 21:09:22 +02:00
|
|
|
dist: xenial
|
|
|
|
sudo: true
|
2018-09-02 11:05:09 +02:00
|
|
|
|
2019-09-24 08:52:54 +02:00
|
|
|
cache:
|
|
|
|
- directories:
|
|
|
|
- $HOME/.cache/pip
|
|
|
|
- client/node_modules
|
|
|
|
|
2018-09-02 11:05:09 +02:00
|
|
|
matrix:
|
|
|
|
include:
|
2019-09-24 08:52:54 +02:00
|
|
|
- stage: "Dependencies"
|
|
|
|
name: "Installing dependencies for python"
|
|
|
|
language: python
|
2018-09-02 11:05:09 +02:00
|
|
|
python:
|
|
|
|
- "3.6"
|
2019-09-24 08:52:54 +02:00
|
|
|
cache:
|
|
|
|
pip: true
|
2018-09-02 11:05:09 +02:00
|
|
|
install:
|
|
|
|
- python --version
|
|
|
|
- pip install --upgrade setuptools pip
|
|
|
|
- pip install --upgrade --requirement requirements/development.txt
|
|
|
|
- pip install --upgrade .[big_mode]
|
|
|
|
- pip freeze
|
2019-09-24 08:52:54 +02:00
|
|
|
script: skip
|
|
|
|
|
|
|
|
- name: "Installing npm dependencies"
|
|
|
|
language: node_js
|
|
|
|
node_js: "10.9"
|
|
|
|
cache:
|
|
|
|
- directories:
|
|
|
|
- "client/node_modules"
|
|
|
|
before_install:
|
|
|
|
- npm install -g @angular/cli@~8.0.6
|
|
|
|
- ng --version
|
|
|
|
- cd client
|
|
|
|
install:
|
|
|
|
- npm install
|
|
|
|
script: skip
|
|
|
|
- stage: "Run tests"
|
|
|
|
name: "Server: Tests Python 3.6"
|
|
|
|
language: python
|
|
|
|
python:
|
|
|
|
- "3.6"
|
2018-09-02 11:05:09 +02:00
|
|
|
script:
|
2019-07-03 07:46:23 +02:00
|
|
|
- mypy openslides/ tests/
|
2019-07-29 15:19:59 +02:00
|
|
|
- pytest --cov --cov-fail-under=75
|
2018-09-02 11:05:09 +02:00
|
|
|
|
2019-09-24 08:52:54 +02:00
|
|
|
- name: "Server: Tests Python 3.7"
|
|
|
|
language: python
|
2018-09-02 11:05:09 +02:00
|
|
|
python:
|
|
|
|
- "3.7"
|
|
|
|
script:
|
|
|
|
- flake8 openslides tests
|
|
|
|
- isort --check-only --diff --recursive openslides tests
|
2019-03-26 14:57:04 +01:00
|
|
|
- black --check --diff --target-version py36 openslides tests
|
2019-07-03 07:46:23 +02:00
|
|
|
- mypy openslides/ tests/
|
2019-07-29 15:19:59 +02:00
|
|
|
- pytest --cov --cov-fail-under=75
|
2018-09-02 11:05:09 +02:00
|
|
|
|
2019-09-24 08:52:54 +02:00
|
|
|
- name: "Server: Tests Startup Routine Python 3.7"
|
|
|
|
language: python
|
2019-01-24 11:34:20 +01:00
|
|
|
python:
|
|
|
|
- "3.7"
|
|
|
|
script:
|
|
|
|
- set -e
|
|
|
|
- python manage.py createsettings
|
|
|
|
- python manage.py migrate
|
|
|
|
- python manage.py runserver --noreload & (sleep 15 && kill $(ps aux | grep 'manage.py runserver' | head -n -1 | awk '{print $2}'))
|
|
|
|
- set +e
|
|
|
|
|
2019-09-24 08:52:54 +02:00
|
|
|
- name: "Client: Linting"
|
|
|
|
language: node_js
|
|
|
|
node_js: "10.9"
|
2018-09-02 11:05:09 +02:00
|
|
|
script:
|
2019-09-24 08:52:54 +02:00
|
|
|
- cd client
|
2019-07-26 11:46:59 +02:00
|
|
|
- npm run lint-check
|
2018-11-01 16:05:01 +01:00
|
|
|
|
2019-09-24 08:52:54 +02:00
|
|
|
- name: "Client: Code Formatting Check"
|
|
|
|
language: node_js
|
|
|
|
node_js: "10.9"
|
2018-11-30 11:59:35 +01:00
|
|
|
script:
|
2019-09-24 08:52:54 +02:00
|
|
|
- cd client
|
2019-04-12 15:11:12 +02:00
|
|
|
- npm list --depth=0 || cat --help
|
2018-12-15 12:24:07 +01:00
|
|
|
- npm run prettify-check
|
2018-11-30 11:59:35 +01:00
|
|
|
|
2019-09-24 08:52:54 +02:00
|
|
|
- name: "Client: Testing"
|
|
|
|
language: node_js
|
|
|
|
node_js: "10.9"
|
2018-11-01 16:05:01 +01:00
|
|
|
apt:
|
|
|
|
sources:
|
|
|
|
- google-chrome
|
|
|
|
packages:
|
|
|
|
- google-chrome-stable
|
2019-01-15 13:09:35 +01:00
|
|
|
services:
|
|
|
|
- xvfb
|
2019-09-24 08:52:54 +02:00
|
|
|
install:
|
|
|
|
- cd client
|
2018-11-01 16:05:01 +01:00
|
|
|
- export CHROME_BIN=/usr/bin/google-chrome
|
|
|
|
- export DISPLAY=:99.0
|
2018-11-30 11:59:35 +01:00
|
|
|
script:
|
|
|
|
- ng test --watch=false
|
|
|
|
|
2019-09-24 08:52:54 +02:00
|
|
|
- name: "Client: Build"
|
|
|
|
language: node_js
|
|
|
|
node_js: "10.9"
|
2018-11-01 16:05:01 +01:00
|
|
|
script:
|
2019-09-24 08:52:54 +02:00
|
|
|
- cd client
|
2019-08-30 10:57:28 +02:00
|
|
|
- npm run build-debug
|
2018-11-01 16:05:01 +01:00
|
|
|
|
2019-09-24 08:52:54 +02:00
|
|
|
- name: "Client: Production Build (ES5)"
|
|
|
|
language: node_js
|
|
|
|
node_js: "10.9"
|
|
|
|
install:
|
2018-11-01 16:05:01 +01:00
|
|
|
- cd client
|
2019-07-17 14:04:37 +02:00
|
|
|
- sed -i '/\"target\"/c\\"target\":\"es5\",' tsconfig.json
|
|
|
|
script:
|
2019-08-15 12:01:09 +02:00
|
|
|
- npm run build
|
2019-07-17 14:04:37 +02:00
|
|
|
|
2019-09-24 08:52:54 +02:00
|
|
|
- name: "Client: Production Build (ES2015)"
|
|
|
|
language: node_js
|
|
|
|
node_js: "10.9"
|
|
|
|
install:
|
2019-07-17 14:04:37 +02:00
|
|
|
- cd client
|
|
|
|
- echo "Firefox ESR" > browserslist
|
2018-11-01 16:05:01 +01:00
|
|
|
script:
|
2019-08-15 12:01:09 +02:00
|
|
|
- npm run build
|