74 lines
1.4 KiB
YAML
74 lines
1.4 KiB
YAML
![]() |
dist: xenial
|
||
|
language: python
|
||
|
sudo: false
|
||
|
|
||
|
python:
|
||
|
- "3.6"
|
||
|
- "3.7"
|
||
|
|
||
|
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
|
||
|
nvm install 10 \
|
||
|
&& npm i \
|
||
|
&& npm run build-assets --production \
|
||
|
&& npm run build-emails
|
||
|
fi
|
||
|
|
||
|
script:
|
||
|
- >
|
||
|
if [ -n "$DJANGO" ]; then
|
||
|
npm run test
|
||
|
fi
|
||
|
- tox
|
||
|
|
||
|
env:
|
||
|
global:
|
||
|
- DATABASE_URL="postgres://postgres@localhost:5432/saleor"
|
||
|
- SECRET_KEY="irrelevant"
|
||
|
- DIFF_RESULTS_BASE_URL="http://dhrwmpu5reeyd.cloudfront.net"
|
||
|
- QUERIES_RESULTS_PATH=/tmp/queries-results.json
|
||
|
matrix:
|
||
|
- DJANGO="2.2"
|
||
|
- DJANGO="master"
|
||
|
|
||
|
matrix:
|
||
|
fast_finish: true
|
||
|
include:
|
||
|
- env: TOXENV=black
|
||
|
python: "3.6"
|
||
|
- env: TOXENV=flake8
|
||
|
python: "3.6"
|
||
|
- env: TOXENV=check_gql_schema
|
||
|
python: "3.6"
|
||
|
- env: TOXENV=check_migrations
|
||
|
python: "3.6"
|
||
|
allow_failures:
|
||
|
- python: "3.6"
|
||
|
env: DJANGO="master"
|
||
|
- python: "3.7"
|
||
|
env: DJANGO="master"
|
||
|
|
||
|
services:
|
||
|
- postgresql
|
||
|
|
||
|
addons:
|
||
|
postgresql: 9.4
|
||
|
|
||
|
after_success:
|
||
|
- ../queries-ci-tools/handle-event.sh
|