2018-08-08 21:09:22 +02:00
|
|
|
dist: xenial
|
2020-06-18 15:22:38 +02:00
|
|
|
os: linux
|
2018-09-02 11:05:09 +02:00
|
|
|
|
2019-09-24 08:52:54 +02:00
|
|
|
cache:
|
|
|
|
- directories:
|
|
|
|
- $HOME/.cache/pip
|
|
|
|
- client/node_modules
|
|
|
|
|
2020-06-18 15:22:38 +02:00
|
|
|
jobs:
|
2018-09-02 11:05:09 +02:00
|
|
|
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
|
2020-06-18 15:22:38 +02:00
|
|
|
before_install:
|
2018-09-02 11:05:09 +02:00
|
|
|
- python --version
|
2020-06-18 15:22:38 +02:00
|
|
|
- cd server
|
|
|
|
install:
|
|
|
|
- pip install --upgrade pip
|
|
|
|
- pip install --upgrade --requirement requirements.txt
|
2018-09-02 11:05:09 +02:00
|
|
|
- pip freeze
|
2019-09-24 08:52:54 +02:00
|
|
|
script: skip
|
|
|
|
|
|
|
|
- name: "Installing npm dependencies"
|
|
|
|
language: node_js
|
2020-06-11 11:20:00 +02:00
|
|
|
node_js: "12.18"
|
2019-09-24 08:52:54 +02:00
|
|
|
cache:
|
|
|
|
- directories:
|
|
|
|
- "client/node_modules"
|
|
|
|
before_install:
|
|
|
|
- npm install -g @angular/cli@~8.0.6
|
|
|
|
- ng --version
|
|
|
|
- cd client
|
|
|
|
install:
|
|
|
|
- npm install
|
|
|
|
script: skip
|
2020-06-18 15:22:38 +02:00
|
|
|
|
2019-09-24 08:52:54 +02:00
|
|
|
- stage: "Run tests"
|
2019-10-11 14:29:38 +02:00
|
|
|
name: "Client: Testing"
|
|
|
|
language: node_js
|
2020-06-11 11:20:00 +02:00
|
|
|
node_js: "12.18"
|
2019-10-11 14:29:38 +02:00
|
|
|
services:
|
|
|
|
- xvfb
|
|
|
|
install:
|
|
|
|
- cd client
|
|
|
|
- export CHROME_BIN=/usr/bin/google-chrome
|
|
|
|
- export DISPLAY=:99.0
|
|
|
|
script:
|
|
|
|
- npm run test-silently
|
|
|
|
|
|
|
|
- name: "Client: Production Build (ES5)"
|
|
|
|
language: node_js
|
2020-06-11 11:20:00 +02:00
|
|
|
node_js: "12.18"
|
2019-10-11 14:29:38 +02:00
|
|
|
install:
|
|
|
|
- cd client
|
|
|
|
- sed -i '/\"target\"/c\\"target\":\"es5\",' tsconfig.json
|
|
|
|
script:
|
|
|
|
- npm run build
|
|
|
|
|
|
|
|
- name: "Client: Production Build (ES2015)"
|
|
|
|
language: node_js
|
2020-06-11 11:20:00 +02:00
|
|
|
node_js: "12.18"
|
2019-10-11 14:29:38 +02:00
|
|
|
install:
|
|
|
|
- cd client
|
|
|
|
- echo "Firefox ESR" > browserslist
|
|
|
|
script:
|
|
|
|
- npm run build
|
|
|
|
|
|
|
|
- name: "Client: Build"
|
|
|
|
language: node_js
|
2020-06-11 11:20:00 +02:00
|
|
|
node_js: "12.18"
|
2019-10-11 14:29:38 +02:00
|
|
|
script:
|
|
|
|
- cd client
|
|
|
|
- npm run build-debug
|
|
|
|
|
2020-06-18 15:22:38 +02:00
|
|
|
- name: "Client: Linting"
|
|
|
|
language: node_js
|
|
|
|
node_js: "12.18"
|
|
|
|
script:
|
|
|
|
- cd client
|
|
|
|
- npm run lint-check
|
|
|
|
|
|
|
|
- name: "Client: Code Formatting Check"
|
|
|
|
language: node_js
|
|
|
|
node_js: "12.18"
|
|
|
|
script:
|
|
|
|
- cd client
|
|
|
|
- npm run prettify-check
|
|
|
|
|
2019-10-11 14:29:38 +02:00
|
|
|
- name: "Server: Tests Python 3.6"
|
2019-09-24 08:52:54 +02:00
|
|
|
language: python
|
|
|
|
python:
|
|
|
|
- "3.6"
|
2020-06-18 15:22:38 +02:00
|
|
|
before_install:
|
|
|
|
- cd server
|
2018-09-02 11:05:09 +02:00
|
|
|
script:
|
2019-07-03 07:46:23 +02:00
|
|
|
- mypy openslides/ tests/
|
2020-03-16 09:29:22 +01: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"
|
2020-06-18 15:22:38 +02:00
|
|
|
before_install:
|
|
|
|
- cd server
|
2018-09-02 11:05:09 +02:00
|
|
|
script:
|
|
|
|
- flake8 openslides tests
|
|
|
|
- isort --check-only --diff --recursive openslides tests
|
2020-08-31 13:24:16 +02:00
|
|
|
- black --check --diff openslides tests
|
2019-07-03 07:46:23 +02:00
|
|
|
- mypy openslides/ tests/
|
2020-03-16 09:29:22 +01:00
|
|
|
- pytest --cov --cov-fail-under=75
|
2018-09-02 11:05:09 +02:00
|
|
|
|
2019-12-10 14:36:38 +01:00
|
|
|
- name: "Server: Tests Python 3.8"
|
|
|
|
language: python
|
|
|
|
python:
|
|
|
|
- "3.8"
|
2020-06-18 15:22:38 +02:00
|
|
|
before_install:
|
|
|
|
- cd server
|
2019-12-10 14:36:38 +01:00
|
|
|
script:
|
|
|
|
- flake8 openslides tests
|
|
|
|
- isort --check-only --diff --recursive openslides tests
|
2020-08-31 13:24:16 +02:00
|
|
|
- black --check --diff openslides tests
|
2019-12-10 14:36:38 +01:00
|
|
|
- mypy openslides/ tests/
|
2020-03-16 09:29:22 +01:00
|
|
|
- pytest --cov --cov-fail-under=75
|
2019-12-10 14:36:38 +01:00
|
|
|
|
2019-10-11 14:29:38 +02:00
|
|
|
- name: "Server: Tests Startup Routine Python 3.7"
|
|
|
|
language: python
|
|
|
|
python:
|
|
|
|
- "3.7"
|
2020-06-18 15:22:38 +02:00
|
|
|
before_install:
|
|
|
|
- cd server
|
2018-11-01 16:05:01 +01:00
|
|
|
script:
|
2019-10-11 14:29:38 +02:00
|
|
|
- set -e
|
|
|
|
- python manage.py createsettings
|
|
|
|
- python manage.py migrate
|
2020-06-18 15:22:38 +02:00
|
|
|
- python manage.py runserver --noreload & (sleep 20 && kill $(ps aux | grep 'manage.py runserver' | head -n -1 | awk '{print $2}'))
|
2019-10-11 14:29:38 +02:00
|
|
|
- set +e
|