Skip to content

Commit 1ec2da2

Browse files
committed
tests: update test flow
1 parent 107583b commit 1ec2da2

7 files changed

Lines changed: 12 additions & 50 deletions

File tree

.github/workflows/release.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,6 @@ jobs:
5656
run: |
5757
python3 -m pip install --upgrade build
5858
python3 -m build
59-
- name: Publish to PyPI
60-
id: publish
61-
env:
62-
TWINE_USERNAME: __token__
63-
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
64-
run: |
65-
python3 -m pip install --upgrade twine
66-
python3 -m twine check dist/*
67-
python3 -m twine upload --verbose dist/*
6859
6960
- uses: act10ns/slack@v2
7061
with:

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
strategy:
1717
matrix:
18-
python-version: ['3.8', '3.9', '3.10', '3.11']
18+
python-version: ['3.10', '3.11', '3.12']
1919

2020
steps:
2121
- uses: actions/checkout@v4

.pre-commit-config.yaml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
repos:
2-
- repo: https://github.com/pre-commit/mirrors-autopep8
3-
rev: v1.5.1
2+
- repo: https://github.com/hhatto/autopep8
3+
rev: v2.0.4
44
hooks:
55
- id: autopep8
66
- repo: https://github.com/pre-commit/pre-commit-hooks.git
7-
rev: v2.5.0
7+
rev: v4.5.0
88
hooks:
99
- id: check-added-large-files
1010
- id: check-ast
@@ -23,22 +23,19 @@ repos:
2323
args: ['--autofix']
2424
- id: name-tests-test
2525
args: ['--django']
26+
exclude: ^tests/helpers/
2627
- id: requirements-txt-fixer
2728
- id: trailing-whitespace
2829
- repo: https://github.com/pycqa/flake8
29-
rev: 3.9.2
30+
rev: 6.1.0
3031
hooks:
3132
- id: flake8
3233
- repo: https://github.com/asottile/pyupgrade
33-
rev: v1.27.0
34+
rev: v3.21.2
3435
hooks:
3536
- id: pyupgrade
3637
args: ['--py3-plus']
37-
- repo: https://github.com/asottile/seed-isort-config
38-
rev: v1.9.4
39-
hooks:
40-
- id: seed-isort-config
41-
- repo: https://github.com/pre-commit/mirrors-isort
42-
rev: v4.3.21
38+
- repo: https://github.com/PyCQA/isort
39+
rev: 7.0.0
4340
hooks:
4441
- id: isort

alertaclient/__init__.py

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +0,0 @@
1-
import sys
2-
3-
if sys.version_info < (3,):
4-
raise ImportError(
5-
"""You are running Alerta 6.0 on Python 2
6-
7-
Alerta 6.0 and above are no longer compatible with Python 2.
8-
9-
Make sure you have pip >= 9.0 to avoid this kind of issue,
10-
as well as setuptools >= 24.2:
11-
12-
$ pip install pip setuptools --upgrade
13-
14-
Your choices:
15-
16-
- Upgrade to Python 3.
17-
18-
- Install an older version of Alerta:
19-
20-
$ pip install 'alerta<6.0'
21-
22-
See the following URL for more up-to-date information:
23-
24-
https://github.com/alerta/alerta/wiki/Python-3
25-
26-
""")

alertaclient/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def update_attributes(self, id, attributes):
107107

108108
def delete_alert(self, id):
109109
return self.http.delete('/alert/%s' % id)
110-
110+
111111
def delete_alerts(self, ids):
112112
return self.http.delete('/alerts?%s' % '&'.join([f'id={id}'for id in ids]))
113113

alertaclient/models/heartbeat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
import re
12
from datetime import datetime, timedelta
23

34
from alertaclient.utils import DateTime
4-
import re
55

66
DEFAULT_MAX_LATENCY = 2000 # ms
77

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
mypy==1.10.1
22
pre-commit==3.3.3
33
pylint==3.2.5
4-
pytest-cov
54
pytest>=5.4.3
5+
pytest-cov
66
python-dotenv
77
requests_mock

0 commit comments

Comments
 (0)