Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to running tests with GitHub Actions. #62

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
test:
name: Run tests
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install tox and any other packages
run: pip install tox
- name: Run tox
run: tox run -e lint,py
17 changes: 0 additions & 17 deletions .travis.yml

This file was deleted.

9 changes: 7 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
[zest.releaser]
create-wheel = yes

[aliases]
test=pytest
[bdist_wheel]
universal = 1

[flake8]
max-line-length = 120

[isort]
force_single_line = true
line_length = 120
lines_between_types = 1
4 changes: 1 addition & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ def get_long_description():
url='https://github.com/socialwifi/jsonapi-requests',
packages=find_packages(exclude=['tests']),
install_requires=parse_requirements('base_requirements.txt'),
setup_requires=['pytest-runner'],
tests_require=['pytest', 'flask'],
extras_require={
'flask': ['flask']
},
Expand All @@ -37,9 +35,9 @@ def get_long_description():
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
]
)
18 changes: 18 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[tox]
requires = tox>=4
env_list = lint, py{39,310,311,312}

[testenv]
description = run unit tests
deps =
flask
pytest
commands = pytest .

[testenv:lint]
description = run linters
skip_install = true
deps =
flake8
commands =
flake8