diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..fdb64be --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,24 @@ +name: Build + +on: + - push + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.6, 3.7, 3.8] + + steps: + - uses: actions/checkout@v1 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install tox tox-gh-actions + - name: Test with tox + run: tox diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 5ae0e1e..0000000 --- a/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: python -dist: xenial -sudo: true -python: - - "3.6" - - "3.7" - - "3.8" -install: pip install tox -script: - - TOXENV=$(tox --listenvs | grep "py${TRAVIS_PYTHON_VERSION/./}-" | tr '\n' ',') - - export TOXENV - - tox diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 765d3f2..424ba1c 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -14,6 +14,16 @@ Unreleased_ See also `latest documentation `_. +Changed +....... + +* CI system changed from Travis to GitHub actions. `173 + `_. + +* Adjusted "examples_aaa" tox environments to sort both outputs and expected + outputs because there were inconsistencies in sorting between local dev and + CI. + 0.11.1_ - 2020/12/28 -------------------- diff --git a/README.rst b/README.rst index c7d6d88..34e908d 100644 --- a/README.rst +++ b/README.rst @@ -1,9 +1,9 @@ Flake8-AAA ========== -.. image:: https://img.shields.io/travis/com/jamescooke/flake8-aaa/master.svg - :target: https://travis-ci.com/jamescooke/flake8-aaa/branches - :alt: Travis build +.. image:: https://img.shields.io/github/workflow/status/jamescooke/flake8-aaa/Build + :alt: GitHub Workflow Status + :target: https://github.com/jamescooke/flake8-aaa/actions?query=branch%3Amaster .. image:: https://img.shields.io/readthedocs/flake8-aaa.svg :alt: Read the Docs diff --git a/examples/bad/bad_expected.out b/examples/bad/bad_expected.out index 5e6fe78..4ca692c 100644 --- a/examples/bad/bad_expected.out +++ b/examples/bad/bad_expected.out @@ -1,10 +1,11 @@ +examples/bad/test.py:4:1: AAA01 no Act block found in test examples/bad/test_aaa01.py:8:1: AAA01 no Act block found in test +examples/bad/test_aaa03.py:10:9: AAA03 expected 1 blank line before Act block, found none +examples/bad/test_aaa03.py:3:5: AAA03 expected 1 blank line before Act block, found none examples/bad/test_aaa03_04.py:10:5: AAA04 expected 1 blank line before Assert block, found none examples/bad/test_aaa03_04.py:3:5: AAA03 expected 1 blank line before Act block, found none examples/bad/test_aaa03_04.py:4:5: AAA04 expected 1 blank line before Assert block, found none examples/bad/test_aaa03_04.py:9:9: AAA03 expected 1 blank line before Act block, found none -examples/bad/test_aaa03.py:10:9: AAA03 expected 1 blank line before Act block, found none -examples/bad/test_aaa03.py:3:5: AAA03 expected 1 blank line before Act block, found none examples/bad/test_aaa04.py:12:5: AAA04 expected 1 blank line before Assert block, found none examples/bad/test_aaa04.py:5:5: AAA04 expected 1 blank line before Assert block, found none examples/bad/test_aaa05.py:24:1: AAA05 blank line in block @@ -21,5 +22,4 @@ examples/bad/test_aaa06.py:9:5: AAA06 comment in Act block examples/bad/test_example.py:4:5: AAA03 expected 1 blank line before Act block, found none examples/bad/test_noqa_flake8.py:11:17: E225 missing whitespace around operator examples/bad/test_noqa_flake8.py:5:10: E201 whitespace after '(' -examples/bad/test.py:4:1: AAA01 no Act block found in test examples/bad/tests.py:4:1: AAA01 no Act block found in test diff --git a/setup.cfg b/setup.cfg index 3aae937..1f3cbcd 100644 --- a/setup.cfg +++ b/setup.cfg @@ -15,4 +15,3 @@ column_limit = 120 [tool:pytest] addopts=--tb=short --color=yes -show_capture = false diff --git a/tox.ini b/tox.ini index 18d20d6..8519eb8 100644 --- a/tox.ini +++ b/tox.ini @@ -61,6 +61,7 @@ whitelist_externals = diff make + # --- Env commands --- [install] @@ -91,4 +92,12 @@ commands = flake8 --version flake8 examples/good - bash -c "flake8 examples/bad/ | sort > {envtmpdir}/out" - diff {envtmpdir}/out examples/bad/bad_expected.out + - bash -c "sort examples/bad/bad_expected.out > {envtmpdir}/expected_out" + diff {envtmpdir}/out {envtmpdir}/expected_out + + +[gh-actions] +python = + 3.6: py36 + 3.7: py37 + 3.8: py38