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

github actions: Update the python versions tested #31

Merged
merged 3 commits into from
Apr 3, 2024
Merged
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
19 changes: 11 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ jobs:
- ubuntu-latest # ubuntu-18.04
# - macos-latest # macOS-10.14 casing trouble for requests-mock
# - windows-latest # windows-2019 causing trouble for the test_xdist
python-version: [2.7, 3.6, 3.7, 3.8, 3.9, '3.10']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -31,8 +31,11 @@ jobs:
- name: Test with tox
run: tox
- name: Upload coverage.xml to codecov
if: ${{ matrix.python-version == '3.8' }}
uses: codecov/codecov-action@v1
if: ${{ matrix.python-version == '3.12' }}
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}

publish:
needs: [test]
Expand All @@ -42,12 +45,12 @@ jobs:
# alternatively, to publish when a GitHub Release is created, use the following rule:
# if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.8'
python-version: '3.12'

- name: Build sdist
run: python setup.py sdist
Expand Down
5 changes: 2 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,14 @@ repos:
rev: v2.3.1
hooks:
- id: pylint
name: pylint38
language_version: python3.8
name: pylint
additional_dependencies:
- pytest
- requests
- requests-mock
- six

- repo: https://github.com/python/black
rev: stable
hooks:
- id: black
language_version: python3.8
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ pytest-cov
tox
wheel>=0.33.0
pytest-xdist
six
20 changes: 10 additions & 10 deletions tests/test_elk_reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,16 @@ def test_skip_in_teardown(skip_in_teardown):

last_report = json.loads(requests_mock.request_history[-1].text)
assert last_report["stats"] == {
u"error": 1,
u"failure": 2,
u"failure & error": 1,
u"passed": 0,
u"skipped & error": 1,
u"passed & error": 1,
u"skipped": 3,
u"xfailed": 1,
u"xpass": 1,
u"error & error": 0,
"error": 1,
"failure": 2,
"failure & error": 1,
"passed": 0,
"skipped & error": 1,
"passed & error": 1,
"skipped": 3,
"xfailed": 1,
"xpass": 1,
"error & error": 0,
}


Expand Down
11 changes: 5 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ isolated_build = true
skip_missing_interpreters = true
envlist =
pre-commit
{py27,py36,py37,py38,py39,py310,pypy2,pypy3}
{py27,py36,py37,py38,py39,py310,py311,py312,pypy2,pypy3}

[gh-actions]
python =
2.7: py27
3.6: py36
3.7: py37
3.8: py38, pre-commit
3.9: py39
3.10: py310
3.9: py39, pre-commit
3.10: py310, pre-commit
3.11: py311, pre-commit
3.12: py312
pypy-3.6: pypy3
pypy-3.7: pypy3

Expand Down