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
|
||||
language: python
|
||||
language: node_js
|
||||
sudo: false
|
||||
|
||||
python:
|
||||
- "3.6"
|
||||
- "3.7"
|
||||
node_js:
|
||||
- "10"
|
||||
- "11.15"
|
||||
- "latest"
|
||||
|
||||
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
|
||||
- npm run build
|
||||
- npm test
|
||||
|
||||
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
|
||||
- APP_MOUNT_URI="/"
|
||||
- API_URI="/graphql/"
|
||||
|
|
Loading…
Reference in a new issue