forked from OpenSlides/OpenSlides
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
140 lines (127 loc) · 3.32 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
dist: xenial
os: linux
cache:
- directories:
- $HOME/.cache/pip
- client/node_modules
jobs:
include:
- stage: "Dependencies"
name: "Installing dependencies for python"
language: python
python:
- "3.6"
cache:
pip: true
before_install:
- python --version
- cd server
install:
- pip install --upgrade pip
- pip install --upgrade --requirement requirements.txt
- pip freeze
script: skip
- name: "Installing npm dependencies"
language: node_js
node_js: "12.18"
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: "Client: Testing"
language: node_js
node_js: "12.18"
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
node_js: "12.18"
install:
- cd client
- sed -i '/\"target\"/c\\"target\":\"es5\",' tsconfig.json
script:
- npm run build
- name: "Client: Production Build (ES2015)"
language: node_js
node_js: "12.18"
install:
- cd client
- echo "Firefox ESR" > browserslist
script:
- npm run build
- name: "Client: Build"
language: node_js
node_js: "12.18"
script:
- cd client
- npm run build-debug
- 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
- name: "Server: Tests Python 3.6"
language: python
python:
- "3.6"
before_install:
- cd server
script:
- mypy openslides/ tests/
- pytest --cov --cov-fail-under=75
- name: "Server: Tests Python 3.7"
language: python
python:
- "3.7"
before_install:
- cd server
script:
- flake8 openslides tests
- isort --check-only --diff --recursive openslides tests
- black --check --diff openslides tests
- mypy openslides/ tests/
- pytest --cov --cov-fail-under=75
- name: "Server: Tests Python 3.8"
language: python
python:
- "3.8"
before_install:
- cd server
script:
- flake8 openslides tests
- isort --check-only --diff --recursive openslides tests
- black --check --diff openslides tests
- mypy openslides/ tests/
- pytest --cov --cov-fail-under=75
- name: "Server: Tests Startup Routine Python 3.7"
language: python
python:
- "3.7"
before_install:
- cd server
script:
- set -e
- python manage.py createsettings
- python manage.py migrate
- python manage.py runserver --noreload & (sleep 20 && kill $(ps aux | grep 'manage.py runserver' | head -n -1 | awk '{print $2}'))
- set +e