diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 0000000..0ff4377 --- /dev/null +++ b/.github/workflows/lint.yaml @@ -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 diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..50cdb22 --- /dev/null +++ b/.github/workflows/test.yaml @@ -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 diff --git a/setup.cfg b/setup.cfg index 14f422a..75b4761 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,7 +2,6 @@ universal = 1 [isort] -not_skip = __init__.py default_section = THIRDPARTY known_first_party = bison,tests diff --git a/tox.ini b/tox.ini index 2a3d299..fa6a938 100644 --- a/tox.ini +++ b/tox.ini @@ -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