Add lint, remove travis
This commit is contained in:
parent
5212bcb787
commit
2677bc04c6
3
.github/workflows/build.yml
vendored
3
.github/workflows/build.yml
vendored
@ -57,6 +57,9 @@ jobs:
|
|||||||
DATABASE_URI: 'mysql+pymysql://mariadb:mariadb@mariadb:${{ job.services.mariadb.ports[3306] }}/dataset?charset=utf8'
|
DATABASE_URI: 'mysql+pymysql://mariadb:mariadb@mariadb:${{ job.services.mariadb.ports[3306] }}/dataset?charset=utf8'
|
||||||
run: |
|
run: |
|
||||||
make test
|
make test
|
||||||
|
- name: Run flake8 to lint
|
||||||
|
run: |
|
||||||
|
flake8 --ignore=E501,E123,E124,E126,E127,E128 dataset
|
||||||
- name: Build a distribution
|
- name: Build a distribution
|
||||||
run: |
|
run: |
|
||||||
python setup.py sdist bdist_wheel
|
python setup.py sdist bdist_wheel
|
||||||
|
|||||||
25
.travis.yml
25
.travis.yml
@ -1,25 +0,0 @@
|
|||||||
dist: xenial
|
|
||||||
language: python
|
|
||||||
python:
|
|
||||||
- '3.8'
|
|
||||||
services:
|
|
||||||
- mysql
|
|
||||||
- postgresql
|
|
||||||
env:
|
|
||||||
- 'DATABASE_URL=sqlite:///:memory:'
|
|
||||||
- DATABASE_URL=postgresql+psycopg2://postgres@127.0.0.1/dataset
|
|
||||||
- DATABASE_URL=mysql+pymysql://root@127.0.0.1/dataset?charset=utf8
|
|
||||||
install:
|
|
||||||
- pip install -U pip wheel
|
|
||||||
- pip install flake8 psycopg2 PyMySQL nose
|
|
||||||
- pip install -e .
|
|
||||||
before_script:
|
|
||||||
- sh -c "if [ '$DATABASE_URL' = 'postgresql+psycopg2://postgres@127.0.0.1/dataset' ]; then psql -c 'DROP DATABASE IF EXISTS dataset;' -U postgres; fi"
|
|
||||||
- sh -c "if [ '$DATABASE_URL' = 'postgresql+psycopg2://postgres@127.0.0.1/dataset' ]; then psql -c 'create database dataset;' -U postgres; fi"
|
|
||||||
- sh -c "if [ '$DATABASE_URL' = 'mysql+pymysql://root@127.0.0.1/dataset?charset=utf8' ]; then mysql -e 'create database IF NOT EXISTS dataset DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;'; fi"
|
|
||||||
script:
|
|
||||||
- flake8 --ignore=E501,E123,E124,E126,E127,E128 dataset test
|
|
||||||
- nosetests -v
|
|
||||||
cache:
|
|
||||||
directories:
|
|
||||||
- $HOME/.cache/pip
|
|
||||||
Loading…
Reference in New Issue
Block a user