Add travis config
This commit is contained in:
parent
27c37b600d
commit
cd09246d1a
1 changed files with 9 additions and 60 deletions
69
.travis.yml
69
.travis.yml
|
@ -1,73 +1,22 @@
|
||||||
dist: xenial
|
dist: xenial
|
||||||
language: python
|
language: node_js
|
||||||
sudo: false
|
sudo: false
|
||||||
|
|
||||||
python:
|
node_js:
|
||||||
- "3.6"
|
- "10"
|
||||||
- "3.7"
|
- "11.15"
|
||||||
|
- "latest"
|
||||||
|
|
||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
- /next\/.*/
|
- /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:
|
script:
|
||||||
- >
|
- npm run build
|
||||||
if [ -n "$DJANGO" ]; then
|
- npm test
|
||||||
npm run test
|
|
||||||
fi
|
|
||||||
- tox
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
- DATABASE_URL="postgres://postgres@localhost:5432/saleor"
|
- APP_MOUNT_URI="/"
|
||||||
- SECRET_KEY="irrelevant"
|
- API_URI="/graphql/"
|
||||||
- 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
|
|
||||||
|
|
Loading…
Reference in a new issue