ci: update project ci

This commit is contained in:
Erick Daniszewski 2020-07-10 14:27:43 -04:00
parent 6e05e18422
commit 4ec8035bf7
4 changed files with 58 additions and 5 deletions

21
.github/workflows/lint.yaml vendored Normal file
View File

@ -0,0 +1,21 @@
name: lint
on:
push: {}
pull_request: {}
jobs:
lint:
runs-on: ubuntu-latest
name: Python 3.8 Lint
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install -U pip setuptools wheel
python -m pip install -U tox tox-gh-actions
- name: Lint
run: tox -e lint

25
.github/workflows/test.yaml vendored Normal file
View File

@ -0,0 +1,25 @@
name: test
on:
push: {}
pull_request: {}
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
py-version: ['3.6', '3.7', '3.8']
name: Python ${{ matrix.py-version }} Test
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.py-version }}
- name: Install dependencies
run: |
python -m pip install -U pip setuptools wheel
python -m pip install -U tox tox-gh-actions
- name: Run tests
run: tox

View File

@ -2,7 +2,6 @@
universal = 1
[isort]
not_skip = __init__.py
default_section = THIRDPARTY
known_first_party = bison,tests

16
tox.ini
View File

@ -1,14 +1,21 @@
[tox]
envlist = py{34,35,36}
envlist = py{35,36,37,38}
minversion=3.4.0
skipsdist=True
skip_missing_interpreters=True
[gh-actions]
python =
3.6: py36
3.7: py37
3.8: py38,lint
[testenv]
basepython=
py34: python3.4
py35: python3.5
py36: python3.6
py37: python3.7
py38: python3.8
deps=
pytest
pytest-cov
@ -28,8 +35,9 @@ commands=
[testenv:lint]
deps=
isort
isort>-5.0.0
flake8
basepython=python3
commands=
flake8 --ignore=E501,E712 bison
isort bison tests -rc -c --diff
isort bison tests --check --diff