OpenSlides/.travis.yml
FinnStutzenstein 5aef823807 Major cache rewrite:
- Removed the restricted data cache (it wasn't used since OS 3.0)
- unify functions for restricted and full data: Just one function, which
  accteps an optional user_id: If it is None, full data is returned, and
  with a user id given, the restricted data
- More atomic access to redis, especially for:
- Check for data-existance in redis and do an auto-ensure-cache.
- Speedup through hashing of scripts and redis' script cache.
- Save schema version into the redis cache and rebuild, if the version
  changed

Client changes:
- Simplified the ConstantsService
- Fixed bug, when receiving an autoupdate with all_data=True from the
  Server
2019-08-08 08:35:02 +02:00

167 lines
4.1 KiB
YAML

dist: xenial
sudo: true
matrix:
include:
- language: python
name: "Server: Tests Python 3.6"
cache:
pip: true
python:
- "3.6"
install:
- python --version
- pip install --upgrade setuptools pip
- pip install --upgrade --requirement requirements/development.txt
- pip install --upgrade .[big_mode]
- pip freeze
script:
- mypy openslides/ tests/
- pytest --cov --cov-fail-under=75
- language: python
name: "Server: Tests Python 3.7"
cache:
pip: true
python:
- "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:
- flake8 openslides tests
- isort --check-only --diff --recursive openslides tests
- black --check --diff --target-version py36 openslides tests
- mypy openslides/ tests/
- pytest --cov --cov-fail-under=75
- language: python
name: "Server: Tests Startup Routine Python 3.7"
cache:
pip: true
python:
- "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:
- 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
- language: node_js
name: "Client: Linting"
node_js:
- "10.9"
cache:
directories:
- node_modules
before_install:
- npm install -g @angular/cli@~8.0.6
- ng --version
- cd client
install:
- npm install
script:
- npm run lint-check
- language: node_js
name: "Client: Code Formatting Check"
node_js:
- "10.9"
cache:
directories:
- node_modules
before_install:
- npm install -g @angular/cli@~8.0.6
- ng --version
- cd client
install:
- npm install
script:
- npm list --depth=0 || cat --help
- npm run prettify-check
- language: node_js
name: "Client: Testing"
node_js:
- "10.9"
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
cache:
directories:
- node_modules
services:
- xvfb
before_install:
- export CHROME_BIN=/usr/bin/google-chrome
- export DISPLAY=:99.0
- npm install -g @angular/cli@~8.0.6
- ng --version
- cd client
install:
- npm install
script:
- ng test --watch=false
- language: node_js
name: "Client: Build"
node_js:
- "10.9"
cache:
directories:
- node_modules
before_install:
- npm install -g @angular/cli@~8.0.6
- ng --version
- cd client
install:
- npm install
script:
- ng build
- language: node_js
name: "Client: Production Build (ES5)"
node_js:
- "10.9"
cache:
directories:
- node_modules
before_install:
- npm install -g @angular/cli@~8.0.6
- ng --version
- cd client
- sed -i '/\"target\"/c\\"target\":\"es5\",' tsconfig.json
install:
- npm install
script:
- npm run ng-high-memory -- build --prod --aot
- language: node_js
name: "Client: Production Build (ES2015)"
node_js:
- "10.9"
cache:
directories:
- node_modules
before_install:
- npm install -g @angular/cli@~8.0.6
- ng --version
- cd client
- echo "Firefox ESR" > browserslist
install:
- npm install
script:
- npm run ng-high-memory -- build --prod --aot