Skip to content

Commit

Permalink
ci: set up CI with Github Actions
Browse files Browse the repository at this point in the history
Note that because of a bug fix in Python 3.8, the position of
`noqa: F811` for @overload has to be changed (see also
https://gitlab.com/pycqa/flake8/issues/583). So, if we want to pass
flake8 both with Python 3.7 and 3.8, we need to put `noqa: F811` for two
lines per @overload. This situation will be resolved by a new release of
pyflakes with improving @overload detection PyCQA/pyflakes#435.
  • Loading branch information
tueda committed Dec 15, 2019
1 parent 4d3ccf8 commit aa52c0b
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
36 changes: 36 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: CI

on: [push, pull_request]

jobs:
lint:
strategy:
matrix:
python: [3.7, 3.8]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python }}
- name: Set PY
run: echo "::set-env name=PY::$(python --version --version | sha256sum | cut -d' ' -f1)"
- uses: actions/cache@v1
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
- run: pip install gitlint
- run: gitlint
- uses: pre-commit/[email protected]
test:
strategy:
matrix:
os: [ubuntu-16.04, ubuntu-18.04]
python: [2.7, 3.5, 3.6, 3.7, 3.8]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python }}
- run: python formset.py
2 changes: 1 addition & 1 deletion formset.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def round_human_readable(x, up, tostring): # noqa: D103


@overload # noqa: F811
def round_human_readable(x, up, tostring): # noqa: D103
def round_human_readable(x, up, tostring): # noqa: D103, F811
# type: (int, bool, Literal[False]) -> int
pass

Expand Down

0 comments on commit aa52c0b

Please sign in to comment.