Improves travis a little bit

This commit is contained in:
GabrielMeyer 2019-09-24 08:52:54 +02:00
parent 534f2d1835
commit 49bec70042

View File

@ -1,36 +1,54 @@
dist: xenial dist: xenial
sudo: true sudo: true
cache:
- directories:
- $HOME/.cache/pip
- client/node_modules
matrix: matrix:
include: include:
- language: python - stage: "Dependencies"
name: "Server: Tests Python 3.6" name: "Installing dependencies for python"
cache: language: python
pip: true
python: python:
- "3.6" - "3.6"
cache:
pip: true
install: install:
- python --version - python --version
- pip install --upgrade setuptools pip - pip install --upgrade setuptools pip
- pip install --upgrade --requirement requirements/development.txt - pip install --upgrade --requirement requirements/development.txt
- pip install --upgrade .[big_mode] - pip install --upgrade .[big_mode]
- pip freeze - pip freeze
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"
script: script:
- mypy openslides/ tests/ - mypy openslides/ tests/
- pytest --cov --cov-fail-under=75 - pytest --cov --cov-fail-under=75
- language: python - name: "Server: Tests Python 3.7"
name: "Server: Tests Python 3.7" language: python
cache:
pip: true
python: python:
- "3.7" - "3.7"
install:
- python --version
- pip install --upgrade setuptools pip
- pip install --upgrade --requirement requirements/development.txt
- pip install --upgrade .[big_mode]
- pip freeze
script: script:
- flake8 openslides tests - flake8 openslides tests
- isort --check-only --diff --recursive openslides tests - isort --check-only --diff --recursive openslides tests
@ -38,18 +56,10 @@ matrix:
- mypy openslides/ tests/ - mypy openslides/ tests/
- pytest --cov --cov-fail-under=75 - pytest --cov --cov-fail-under=75
- language: python - name: "Server: Tests Startup Routine Python 3.7"
name: "Server: Tests Startup Routine Python 3.7" language: python
cache:
pip: true
python: python:
- "3.7" - "3.7"
install:
- python --version
- pip install --upgrade setuptools pip
- pip install --upgrade --requirement requirements/development.txt
- pip install --upgrade .[big_mode]
- pip freeze
script: script:
- set -e - set -e
- python manage.py createsettings - python manage.py createsettings
@ -57,110 +67,59 @@ matrix:
- python manage.py runserver --noreload & (sleep 15 && kill $(ps aux | grep 'manage.py runserver' | head -n -1 | awk '{print $2}')) - python manage.py runserver --noreload & (sleep 15 && kill $(ps aux | grep 'manage.py runserver' | head -n -1 | awk '{print $2}'))
- set +e - set +e
- language: node_js - name: "Client: Linting"
name: "Client: Linting" language: node_js
node_js: node_js: "10.9"
- "10.9"
cache:
directories:
- node_modules
before_install:
- npm install -g @angular/cli@~8.0.6
- ng --version
- cd client
install:
- npm install
script: script:
- cd client
- npm run lint-check - npm run lint-check
- language: node_js - name: "Client: Code Formatting Check"
name: "Client: Code Formatting Check" language: node_js
node_js: node_js: "10.9"
- "10.9"
cache:
directories:
- node_modules
before_install:
- npm install -g @angular/cli@~8.0.6
- ng --version
- cd client
install:
- npm install
script: script:
- cd client
- npm list --depth=0 || cat --help - npm list --depth=0 || cat --help
- npm run prettify-check - npm run prettify-check
- language: node_js - name: "Client: Testing"
name: "Client: Testing" language: node_js
node_js: node_js: "10.9"
- "10.9"
apt: apt:
sources: sources:
- google-chrome - google-chrome
packages: packages:
- google-chrome-stable - google-chrome-stable
cache:
directories:
- node_modules
services: services:
- xvfb - xvfb
before_install: install:
- cd client
- export CHROME_BIN=/usr/bin/google-chrome - export CHROME_BIN=/usr/bin/google-chrome
- export DISPLAY=:99.0 - export DISPLAY=:99.0
- npm install -g @angular/cli@~8.0.6
- ng --version
- cd client
install:
- npm install
script: script:
- ng test --watch=false - ng test --watch=false
- language: node_js - name: "Client: Build"
name: "Client: Build" language: node_js
node_js: node_js: "10.9"
- "10.9"
cache:
directories:
- node_modules
before_install:
- npm install -g @angular/cli@~8.0.6
- ng --version
- cd client
install:
- npm install
script: script:
- cd client
- npm run build-debug - npm run build-debug
- language: node_js - name: "Client: Production Build (ES5)"
name: "Client: Production Build (ES5)" language: node_js
node_js: node_js: "10.9"
- "10.9" install:
cache:
directories:
- node_modules
before_install:
- npm install -g @angular/cli@~8.0.6
- ng --version
- cd client - cd client
- sed -i '/\"target\"/c\\"target\":\"es5\",' tsconfig.json - sed -i '/\"target\"/c\\"target\":\"es5\",' tsconfig.json
install:
- npm install
script: script:
- npm run build - npm run build
- language: node_js - name: "Client: Production Build (ES2015)"
name: "Client: Production Build (ES2015)" language: node_js
node_js: node_js: "10.9"
- "10.9" install:
cache:
directories:
- node_modules
before_install:
- npm install -g @angular/cli@~8.0.6
- ng --version
- cd client - cd client
- echo "Firefox ESR" > browserslist - echo "Firefox ESR" > browserslist
install:
- npm install
script: script:
- npm run build - npm run build