add make test-build-js

add python38 to Travis
This commit is contained in:
sergerdn 2021-01-29 09:57:03 +03:00
parent 6eeafcf56b
commit 7f16d44b48
3 changed files with 52 additions and 12 deletions

View File

@ -1,16 +1,43 @@
language: python
dist: bionic
node_js: node_js:
- "6.2.0" - "10"
addons: jobs:
postgresql: "9.4"
matrix:
include: include:
- python: "3.7" - name: "python3.7-postgresql-9.4-bionic"
dist: bionic
language: python
python: "3.7"
env: TOXENV=py37 env: TOXENV=py37
addons:
postgresql: "9.4"
- name: "python3.7-postgresql-10-bionic"
dist: bionic
language: python
python: "3.7"
env: TOXENV=py37
addons:
postgresql: '10'
apt:
packages:
- postgresql-10
- postgresql-client-10
- postgresql-server-dev-10
services:
- postgresql
- name: "python3.8-postgresql-12-focal"
dist: focal
language: python
python: "3.8"
env: TOXENV=py38
addons:
postgresql: '12'
apt:
packages:
- postgresql-12
- postgresql-client-12
- postgresql-server-dev-12
services:
- postgresql
cache: cache:
directories: directories:
@ -27,6 +54,12 @@ env:
- BOTO_CONFIG=/doesnotexist - BOTO_CONFIG=/doesnotexist
before_script: before_script:
- sudo systemctl stop postgresql
# the port may have been auto-configured to use 5433 if it thought 5422 was already in use,
# for some reason it happens very often
# https://github.com/travis-ci/travis-build/blob/master/lib/travis/build/bash/travis_setup_postgresql.bash#L52
- sudo sed -i -e 's/5433/5432/' /etc/postgresql/*/main/postgresql.conf
- sudo systemctl restart postgresql
- psql -c "create database lemur;" -U postgres - psql -c "create database lemur;" -U postgres
- psql -c "create user lemur with password 'lemur;'" -U postgres - psql -c "create user lemur with password 'lemur;'" -U postgres
- psql lemur -c "create extension IF NOT EXISTS pg_trgm;" -U postgres - psql lemur -c "create extension IF NOT EXISTS pg_trgm;" -U postgres
@ -40,6 +73,7 @@ install:
script: script:
- make test - make test
- make test-build-js
- bandit -r . -ll -ii -x lemur/tests/,docs - bandit -r . -ll -ii -x lemur/tests/,docs
after_success: after_success:
@ -51,4 +85,4 @@ notifications:
- lemur@netflix.com - lemur@netflix.com
on_success: never on_success: never
on_failure: always on_failure: always
on_cancel: never # Dependbot cancels Travis before rebase and triggers too many emails on_cancel: never # Dependbot cancels Travis before rebase and triggers too many emails

View File

@ -101,6 +101,12 @@ lint-js:
npm run lint npm run lint
@echo "" @echo ""
test-build-js:
@echo "--> Running JavaScript build"
npm install gulp
./node_modules/.bin/gulp build && node_modules/.bin/gulp package
@echo ""
coverage: develop coverage: develop
coverage run --source=lemur -m py.test coverage run --source=lemur -m py.test
coverage html coverage html
@ -132,4 +138,4 @@ checkout-pr:
git fetch upstream pull/$(pr)/head:pr-$(pr) git fetch upstream pull/$(pr)/head:pr-$(pr)
.PHONY: develop dev-postgres dev-docs setup-git build clean update-submodules test testloop test-cli test-js test-python lint lint-python lint-js coverage publish release .PHONY: develop dev-postgres dev-docs setup-git build clean update-submodules test testloop test-cli test-js test-python lint lint-python lint-js test-build-js coverage publish release

View File

@ -1,2 +1,2 @@
[tox] [tox]
envlist = py37 envlist = py37,py38