Skip to content

Commit

Permalink
Merge pull request #94 from reinout/use-github-actions
Browse files Browse the repository at this point in the history
Use GitHub actions
  • Loading branch information
reinout committed Nov 28, 2022
2 parents 2db50d4 + 03690ad commit b1356d2
Show file tree
Hide file tree
Showing 39 changed files with 894 additions and 1,016 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Testing
on:
push:
branches: [master]
pull_request:
branches: [master]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
test:
name: Testing on
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9, 3.8, 3.7, pypy-3.9]
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache packages
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
- name: pip version
run: pip --version
- name: Install dependencies
run: python -m pip install -r requirements.txt
- name: Install itself
run: python -m pip install -e .
# formatters
- name: Run pyupgrade
if: matrix.python-version == '3.9'
run: pyupgrade --py37-plus setup.py `find z3c -name "*.py"`
- name: Run isort
if: matrix.python-version == '3.9'
run: isort --check-only setup.py z3c/
- name: Run black
if: matrix.python-version == '3.9'
run: black --check --skip-string-normalization setup.py z3c/
# linters
- name: Lint with codespell
if: matrix.python-version == '3.9'
run: codespell *.rst setup.py z3c/
- name: Lint with flake8
if: matrix.python-version == '3.9'
run: flake8 setup.py z3c/ --count --max-complexity=18 --max-line-length=88 --show-source --statistics
# tests and coverage
- name: Test
run: pytest z3c --cov --cov-report term-missing
- name: Coverage
run: coveralls --service=github
19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

10 changes: 8 additions & 2 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@ Changelog of z3c.dependencychecker
2.8 (unreleased)
----------------

- Nothing changed yet.
- Drop python 2.7 support.
[gforcada]

- Replace travis for GitHub actions.
[gforcada]

- Test against python 3.7-3.9 and pypy3.
[gforcada]

2.7 (2018-08-08)
----------------
Expand Down Expand Up @@ -136,7 +142,7 @@ the formatting right :-)
- Improved Django settings extraction.
[reinout]

- Better detection of python build-in modules. ``logging/__init__.py`` style
- Better detection of python built-in modules. ``logging/__init__.py`` style
modules were previously missed.
[reinout]

Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ z3c.dependencychecker
Checks which imports are done and compares them to what's in ``setup.py`` and
warn when discovering missing or unneeded dependencies.

.. image:: https://secure.travis-ci.org/reinout/z3c.dependencychecker.png?branch=master
:target: https://travis-ci.org/#!/reinout/z3c.dependencychecker
.. image:: https://github.com/reinout/z3c.dependencychecker/actions/workflows/testing.yml/badge.svg?branch=master
:target: https://github.com/reinout/z3c.dependencychecker/actions/workflows/testing.yml

.. image:: https://coveralls.io/repos/github/reinout/z3c.dependencychecker/badge.svg?branch=master
:target: https://coveralls.io/github/reinout/z3c.dependencychecker?branch=master
Expand Down
64 changes: 0 additions & 64 deletions buildout.cfg

This file was deleted.

26 changes: 0 additions & 26 deletions requirements-dev.txt

This file was deleted.

24 changes: 24 additions & 0 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
stdlib-list
cached-property
toml

black
codespell
coveralls
flake8-blind-except
flake8-bugbear
flake8-builtins
flake8-comprehensions
flake8-debugger
flake8-deprecated
flake8-isort
flake8-pep3101
flake8-quotes
flake8-todo
importlib-metadata; python_version < '3.8'
isort
pytest
pytest-cov
pyupgrade
typed-ast; python_version < '3.8' # dependency of black
zipp; python_version < '3.8' # dependency of importlib-metadata
140 changes: 134 additions & 6 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,134 @@
# keep them in sync with buildout.cfg
setuptools==38.5.1
zc.buildout==2.11.0
stdlib-list==0.4.0
cached-property==1.3.1
toml==0.9.4
#
# This file is autogenerated by pip-compile with python 3.7
# To update, run:
#
# pip-compile requirements.in
#
attrs==22.1.0
# via
# flake8-bugbear
# pytest
black==22.10.0
# via -r requirements.in
cached-property==1.5.2
# via -r requirements.in
certifi==2022.9.24
# via requests
charset-normalizer==2.1.1
# via requests
click==8.1.3
# via black
codespell==2.2.2
# via -r requirements.in
coverage[toml]==6.5.0
# via
# coveralls
# pytest-cov
coveralls==3.3.1
# via -r requirements.in
docopt==0.6.2
# via coveralls
exceptiongroup==1.0.0rc9
# via pytest
flake8==5.0.4
# via
# flake8-bugbear
# flake8-builtins
# flake8-comprehensions
# flake8-debugger
# flake8-deprecated
# flake8-isort
# flake8-pep3101
# flake8-quotes
flake8-blind-except==0.2.1
# via -r requirements.in
flake8-bugbear==22.10.25
# via -r requirements.in
flake8-builtins==2.0.0
# via -r requirements.in
flake8-comprehensions==3.10.0
# via -r requirements.in
flake8-debugger==4.1.2
# via -r requirements.in
flake8-deprecated==2.0.1
# via -r requirements.in
flake8-isort==5.0.0
# via -r requirements.in
flake8-pep3101==2.0.0
# via -r requirements.in
flake8-quotes==3.3.1
# via -r requirements.in
flake8-todo==0.7
# via -r requirements.in
idna==3.4
# via requests
importlib-metadata==4.2.0 ; python_version < "3.8"
# via
# -r requirements.in
# click
# flake8
# flake8-comprehensions
# pluggy
# pytest
iniconfig==1.1.1
# via pytest
isort==5.10.1
# via
# -r requirements.in
# flake8-isort
mccabe==0.7.0
# via flake8
mypy-extensions==0.4.3
# via black
packaging==21.3
# via pytest
pathspec==0.10.1
# via black
platformdirs==2.5.2
# via black
pluggy==1.0.0
# via pytest
pycodestyle==2.9.1
# via
# flake8
# flake8-debugger
# flake8-todo
pyflakes==2.5.0
# via flake8
pyparsing==3.0.9
# via packaging
pytest==7.2.0
# via
# -r requirements.in
# pytest-cov
pytest-cov==4.0.0
# via -r requirements.in
pyupgrade==3.1.0
# via -r requirements.in
requests==2.28.1
# via coveralls
stdlib-list==0.8.0
# via -r requirements.in
tokenize-rt==5.0.0
# via pyupgrade
toml==0.10.2
# via -r requirements.in
tomli==2.0.1
# via
# black
# coverage
# pytest
typed-ast==1.5.4 ; python_version < "3.8"
# via
# -r requirements.in
# black
typing-extensions==4.4.0
# via
# black
# importlib-metadata
urllib3==1.26.12
# via requests
zipp==3.10.0 ; python_version < "3.8"
# via
# -r requirements.in
# importlib-metadata
12 changes: 10 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,13 @@
create-wheel = yes
extra-message = [ci skip]

[bdist_wheel]
universal = 1
[isort]
profile = black

[flake8]
ignore = E501, # black takes care of line length
W503, # black takes care of where to break lines
D202, # black takes care of blank lines
E203, # black takes care of spaces within slicing (list[:])
E231, # black takes care of spaces after commas
A003, # as one has to use self.XX it should not be a problem
Loading

0 comments on commit b1356d2

Please sign in to comment.