Skip to content

Commit 024249b

Browse files
committed
Update test environment
- Upgrade pytest - Update linting tools (black,isort,flake8) - Run on newer python versions - Remove Travis CI (does not seem to be available anymore)
1 parent 8ce77cd commit 024249b

File tree

4 files changed

+48
-64
lines changed

4 files changed

+48
-64
lines changed

.github/workflows/tox.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Python package
2+
3+
on:
4+
- push
5+
- pull_request
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
python-version: ['3.8', '3.9', '3.10', '3.11']
13+
14+
steps:
15+
- uses: actions/checkout@v3
16+
- name: Set up Python ${{ matrix.python-version }}
17+
uses: actions/setup-python@v4
18+
with:
19+
python-version: ${{ matrix.python-version }}
20+
- name: Install dependencies
21+
run: |
22+
python -m pip install --upgrade pip
23+
python -m pip install tox tox-gh-actions
24+
- name: Test with tox
25+
run: tox

.travis.yml

-35
This file was deleted.

dev-requirements.txt

+3-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ requests
44
freezegun
55

66
# PyTest for running the tests.
7-
pytest==5.2.1
8-
pytest-django==3.5.1
9-
pytest-cov==2.8.1
10-
pytest-pythonpath
7+
pytest==7.3.1
8+
pytest-django==4.5.2
9+
pytest-cov==4.0.0

tox.ini

+20-25
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,17 @@
11
[pytest]
2-
python_paths = ./tests
3-
changedir = ./tests
2+
pythonpath = . tests
43
DJANGO_SETTINGS_MODULE = django_minio_storage_tests.settings
54
addopts=--tb=short
65
python_files = tests.py test_*.py *_tests.py
6+
django_find_project = false
77

8-
[travis]
8+
[gh-actions]
99
python =
10-
3.6: py36
11-
3.7: py37
12-
3.8: py38, lint, docs
10+
3.8: py38
11+
3.9: py39
12+
3.10: py310
13+
3.11: py311, lint, docs
1314

14-
[travis:env]
15-
DJANGO =
16-
1.11: django111
17-
2.1: django21
18-
2.2: django22, lint, docs
19-
3.0: django30
2015

2116
[testenv]
2217
commands = pytest {posargs}
@@ -27,22 +22,22 @@ setenv =
2722
MINIO_STORAGE_SECRET_KEY=weak_secret_key
2823
TOX_ENVNAME={envname}
2924
deps =
30-
django111: Django==1.11.*
31-
django21: Django==2.1.*
25+
3226
django22: Django==2.2.*
33-
django30: Django==3.0b1
27+
django32: Django==3.2.*
28+
django42: Django==4.2.*
3429
minio: minio
35-
minioknown: minio==4.0.21
30+
minioknown: minio==6.0.2
3631
-rdev-requirements.txt
3732

3833
[testenv:lint]
3934
setenv=
4035
PYTHONWARNINGS=ignore
4136
basepython = python3
4237
deps =
43-
flake8==3.8.3
44-
isort==5.4.2
45-
black==20.8b1
38+
flake8==4.0.1
39+
isort==5.10.1
40+
black==22.3.0
4641
commands =
4742
flake8 --config .flake8rc
4843
isort --check --diff .
@@ -54,9 +49,9 @@ setenv=
5449
basepython = python3
5550
deps =
5651
pyupgrade-directories
57-
flake8==3.8.3
58-
isort==5.4.2
59-
black==20.8b1
52+
flake8==6.0.0
53+
isort==5.12.0
54+
black==23.3.0
6055
commands =
6156
pyup_dirs --exit-zero-even-if-changed --py36-plus minio_storage tests
6257
isort .
@@ -69,8 +64,8 @@ commands = mkdocs build
6964

7065
[tox]
7166
envlist =
72-
{py36,py37,py38}-django22-minioknown
73-
py38-django{111,21,30}-minioknown
74-
py38-django22-minio
67+
{py38,py39,py310,py311}-django32-minioknown
68+
py311-django{111,30}-minioknown
69+
py311-django32-minio
7570
lint
7671
docs

0 commit comments

Comments
 (0)