Skip to content

Commit

Permalink
Migrate from Travis to GitHub actions (#173)
Browse files Browse the repository at this point in the history
* Add gh-actions config to tox.ini

* Turn on GHA, remove Travis

* Fix sort of expected bad output

* Update README build icon

* Update CHANGELOG

* Remove old pytest config

* Remove extra whitelisted tox externals

* Sort both example output and expected output

* Update CHANGELOG: sorting fix
  • Loading branch information
jamescooke committed Mar 10, 2021
1 parent d6e2225 commit f2b3e39
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 20 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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
12 changes: 0 additions & 12 deletions .travis.yml

This file was deleted.

10 changes: 10 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ Unreleased_
See also `latest documentation
<https://flake8-aaa.readthedocs.io/en/latest/#__unreleased_marker__>`_.

Changed
.......

* CI system changed from Travis to GitHub actions. `173
<https://github.com/jamescooke/flake8-aaa/issues/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
--------------------

Expand Down
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions examples/bad/bad_expected.out
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
1 change: 0 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ column_limit = 120

[tool:pytest]
addopts=--tb=short --color=yes
show_capture = false
11 changes: 10 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ whitelist_externals =
diff
make


# --- Env commands ---

[install]
Expand Down Expand Up @@ -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

0 comments on commit f2b3e39

Please sign in to comment.