mirror of
https://github.com/andrewthetechie/py-healthchecks.io.git
synced 2026-04-25 16:25:37 +02:00
feat: add python 3.11 support (#392)
* feat: add python 3.11 support - adds testing for python 3.11 - moves from black and flake8 to ruff for linting - Updates coverage output from tests * fix: fix dev dependency group * fix: add installing dev dependencies * ci: add toml * ci: simplify coverage * ci: update coverage
This commit is contained in:
38
.github/workflows/tests.yml
vendored
38
.github/workflows/tests.yml
vendored
@@ -17,13 +17,14 @@ jobs:
|
||||
# - { python: "3.9", os: "ubuntu-latest", session: "mypy" }
|
||||
# - { python: "3.8", os: "ubuntu-latest", session: "mypy" }
|
||||
# - { python: "3.7", os: "ubuntu-latest", session: "mypy" }
|
||||
- { python: "3.11", os: "ubuntu-latest", session: "tests" }
|
||||
- { python: "3.10", os: "ubuntu-latest", session: "tests" }
|
||||
- { python: "3.9", os: "ubuntu-latest", session: "tests" }
|
||||
- { python: "3.8", os: "ubuntu-latest", session: "tests" }
|
||||
- { python: "3.7", os: "ubuntu-latest", session: "tests" }
|
||||
# poetry fails to install on windows
|
||||
# - { python: "3.10", os: "windows-latest", session: "tests" }
|
||||
# - { python: "3.10", os: "macos-latest", session: "tests" }
|
||||
# - { python: "3.10", os: "ubuntu-latest", session: "typeguard" }
|
||||
- { python: "3.11", os: "macos-latest", session: "tests" }
|
||||
- { python: "3.10", os: "ubuntu-latest", session: "xdoctest" }
|
||||
- { python: "3.10", os: "ubuntu-latest", session: "docs-build" }
|
||||
|
||||
@@ -63,7 +64,7 @@ jobs:
|
||||
- name: Install Nox
|
||||
run: |
|
||||
pipx install --pip-args=--constraint=.github/workflows/constraints.txt nox
|
||||
pipx inject --pip-args=--constraint=.github/workflows/constraints.txt nox nox-poetry
|
||||
pipx inject --pip-args=--constraint=.github/workflows/constraints.txt nox nox-poetry toml
|
||||
nox --version
|
||||
|
||||
- name: Compute pre-commit cache key
|
||||
@@ -73,13 +74,15 @@ jobs:
|
||||
run: |
|
||||
import hashlib
|
||||
import sys
|
||||
import os
|
||||
|
||||
python = "py{}.{}".format(*sys.version_info[:2])
|
||||
payload = sys.version.encode() + sys.executable.encode()
|
||||
digest = hashlib.sha256(payload).hexdigest()
|
||||
result = "${{ runner.os }}-{}-{}-pre-commit".format(python, digest[:8])
|
||||
|
||||
print("::set-output name=result::{}".format(result))
|
||||
with open(os.environ['GITHUB_OUTPUT'], 'a') as fh:
|
||||
fh.write(f"result={result}\n")
|
||||
|
||||
- name: Restore pre-commit cache
|
||||
uses: actions/cache@v3.2.5
|
||||
@@ -112,30 +115,6 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: tests
|
||||
steps:
|
||||
- name: Check out the repository
|
||||
uses: actions/checkout@v3.1.0
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4.5.0
|
||||
with:
|
||||
python-version: "3.10"
|
||||
|
||||
- name: Upgrade pip
|
||||
run: |
|
||||
pip install --constraint=.github/workflows/constraints.txt pip
|
||||
pip --version
|
||||
|
||||
- name: Install Poetry
|
||||
run: |
|
||||
pipx install --pip-args=--constraint=.github/workflows/constraints.txt poetry
|
||||
poetry --version
|
||||
|
||||
- name: Install Nox
|
||||
run: |
|
||||
pipx install --pip-args=--constraint=.github/workflows/constraints.txt nox
|
||||
pipx inject --pip-args=--constraint=.github/workflows/constraints.txt nox nox-poetry
|
||||
nox --version
|
||||
|
||||
- name: Download coverage data
|
||||
uses: actions/download-artifact@v3.0.2
|
||||
with:
|
||||
@@ -143,3 +122,6 @@ jobs:
|
||||
|
||||
- name: Upload coverage report
|
||||
uses: codecov/codecov-action@v3.1.1
|
||||
with:
|
||||
files: .coverage.xml
|
||||
verbose: true
|
||||
|
||||
Reference in New Issue
Block a user