forked from saleor/saleor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
76 lines (66 loc) · 1.54 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
dist: xenial
language: python
sudo: false
python:
- "3.8"
branches:
only:
- master
- /next\/.*/
cache:
pip: true
directories:
- node_modules
- $HOME/.cache/pip
install:
- pip install -U pip setuptools wheel
- pip install tox-travis pytest-django-queries
- git clone https://github.com/NyanKiyoshi/pytest-django-queries-ci-tools.git --depth 1 ../queries-ci-tools
- >
if [ -n "$DJANGO" ]; then
cp -r templates/templated_email/compiled ./compiled;
nvm install 10;
npm i;
npm run build-emails;
DIFF=$(diff -q ./compiled templates/templated_email/compiled);
if [ "$DIFF" ]; then
echo "Precompiled emails check failure - make sure you executed: npm run build-emails.";
travis_terminate 1;
fi;
fi;
script:
- tox
env:
global:
- DATABASE_URL="postgres://postgres@localhost:5432/saleor"
- SECRET_KEY="irrelevant"
- QUERIES_RESULTS_PATH=/tmp/queries-results.json
matrix:
- DJANGO="3.0"
- DJANGO="master"
matrix:
fast_finish: true
include:
- env: TOXENV=black
python: "3.8"
- env: TOXENV=flake8
python: "3.8"
- env: TOXENV=mypy
python: "3.8"
- env: TOXENV=check_gql_schema
python: "3.8"
- env: TOXENV=check_migrations
python: "3.8"
- env: TOXENV=pydocstyle
python: "3.8"
- env: TOXENV=isort
python: "3.8"
allow_failures:
- env: DJANGO="master"
python: "3.8"
services:
- postgresql
addons:
postgresql: 9.6
after_success:
- ../queries-ci-tools/handle-event.sh