forked from mozilla/pontoon
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
58 lines (50 loc) · 1.16 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
dist: xenial
sudo: false
language: python
python:
- '3.8'
cache:
pip: true
npm: true
directories:
- node_modules
install:
- pip install -U --force pip
- pip install --require-hashes -r requirements/default.txt
- pip install --require-hashes -r requirements/test.txt
- source $HOME/.nvm/nvm.sh
- nvm install --lts node
- nvm use --lts node
- npm install .
- pushd frontend && npm install && popd
script:
# Lint code
- black pontoon/ --check
- flake8 pontoon/
- ./node_modules/.bin/eslint .
# Build and collect static assets
- ./node_modules/.bin/webpack
- pushd frontend && npm run build && popd
- python manage.py collectstatic -v0 --noinput
# Run tests
- py.test --cov-append --cov-report=term --cov=. -v --create-db --migrations
- npm test
# Run all frontend checks
- pushd frontend
- npm run flow
- npm test
- popd
- codecov
# Heroku deployment file is valid
- cat app.json | python -m json.tool > /dev/null
addons:
postgresql: "9.4"
apt:
packages:
- language-pack-tr
env:
global:
- SECRET_KEY=asdf
- DATABASE_URL=postgres://postgres@localhost/pontoon
- HMAC_KEY=asdf
- HGPYTHON3=1