-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for python version up to 3.11
- Loading branch information
Showing
7 changed files
with
68 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
pip==21.3.1 | ||
nox==2021.10.1 | ||
nox-poetry==0.8.6 | ||
poetry==1.3.1 | ||
virtualenv==20.10.0 | ||
pip==23.0.1 | ||
nox==2022.11.21 | ||
nox-poetry==1.0.3 | ||
poetry==1.4.2 | ||
virtualenv==20.15.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,32 +12,38 @@ on: | |
|
||
jobs: | ||
tests: | ||
name: ${{ matrix.session }} ${{ matrix.python-version }} / ${{ matrix.os }} | ||
name: ${{ matrix.session }} ${{ matrix.python }} / ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- { python-version: 3.9, os: ubuntu-latest, session: "pre-commit" } | ||
# - { python-version: 3.9, os: ubuntu-latest, session: "safety" } | ||
- { python-version: 3.9, os: ubuntu-latest, session: "mypy" } | ||
- { python-version: 3.8, os: ubuntu-latest, session: "mypy" } | ||
- { python-version: 3.9, os: ubuntu-latest, session: "tests" } | ||
- { python-version: 3.8, os: ubuntu-latest, session: "tests" } | ||
- { python-version: 3.9, os: windows-latest, session: "tests" } | ||
- { python-version: 3.9, os: macos-latest, session: "tests" } | ||
- { python-version: 3.9, os: ubuntu-latest, session: "typeguard" } | ||
- { python-version: 3.9, os: ubuntu-latest, session: "xdoctest" } | ||
- { python: "3.11", os: ubuntu-latest, session: "pre-commit" } | ||
- { python: "3.11", os: ubuntu-latest, session: "safety" } | ||
- { python: "3.11", os: ubuntu-latest, session: "mypy" } | ||
- { python: "3.10", os: ubuntu-latest, session: "mypy" } | ||
- { python: "3.9", os: ubuntu-latest, session: "mypy" } | ||
- { python: "3.8", 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.11", os: windows-latest, session: "tests" } | ||
# - { python: "3.11", os: macos-latest, session: "tests" } | ||
- { python: "3.11", os: ubuntu-latest, session: "typeguard" } | ||
- { python: "3.11", os: "ubuntu-latest", session: "docs-build" } | ||
|
||
env: | ||
NOXSESSION: ${{ matrix.session }} | ||
TMDB_API_KEY: ${{secrets.TMDB_API_KEY}} | ||
FORCE_COLOR: "1" | ||
PRE_COMMIT_COLOR: "always" | ||
|
||
steps: | ||
- name: Check out the repository | ||
uses: actions/checkout@v2.4.0 | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
- name: Set up Python ${{ matrix.python }} | ||
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
@@ -47,14 +53,24 @@ jobs: | |
pip install --constraint=.github/workflows/constraints.txt pip | ||
pip --version | ||
- name: Upgrade pip in virtual environments | ||
shell: python | ||
run: | | ||
import os | ||
import pip | ||
with open(os.environ["GITHUB_ENV"], mode="a") as io: | ||
print(f"VIRTUALENV_PIP={pip.__version__}", file=io) | ||
- name: Install Poetry | ||
run: | | ||
pip install --constraint=.github/workflows/constraints.txt poetry | ||
pipx install --pip-args --constraint=.github/workflows/constraints.txt poetry | ||
poetry --version | ||
- name: Install Nox | ||
run: | | ||
pip install --constraint=.github/workflows/constraints.txt nox nox-poetry | ||
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: Compute pre-commit cache key | ||
|
@@ -73,7 +89,7 @@ jobs: | |
print("::set-output name=result::{}".format(result)) | ||
- name: Restore pre-commit cache | ||
uses: actions/cache@v3.2.3 | ||
uses: actions/cache@v3 | ||
if: matrix.session == 'pre-commit' | ||
with: | ||
path: ~/.cache/pre-commit | ||
|
@@ -83,11 +99,11 @@ jobs: | |
- name: Run Nox | ||
run: | | ||
nox --force-color --python=${{ matrix.python-version }} | ||
nox --python=${{ matrix.python }} | ||
- name: Upload coverage data | ||
if: always() && matrix.session == 'tests' | ||
uses: "actions/upload-artifact@v3.1.2" | ||
uses: "actions/upload-artifact@v3" | ||
with: | ||
name: coverage-data | ||
path: ".coverage.*" | ||
|
@@ -97,12 +113,12 @@ jobs: | |
needs: tests | ||
steps: | ||
- name: Check out the repository | ||
uses: actions/checkout@v2.4.0 | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v2.3.1 | ||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: 3.9 | ||
python-version: "3.11" | ||
|
||
- name: Upgrade pip | ||
run: | | ||
|
@@ -111,26 +127,28 @@ jobs: | |
- name: Install Poetry | ||
run: | | ||
pip install --constraint=.github/workflows/constraints.txt poetry | ||
pipx install --pip-args=--constraint=.github/workflows/constraints.txt poetry | ||
poetry --version | ||
- name: Install Nox | ||
run: | | ||
pip install --constraint=.github/workflows/constraints.txt nox nox-poetry | ||
nox --version | ||
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 | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: coverage-data | ||
|
||
- name: Combine coverage data and display human readable report | ||
run: | | ||
nox --force-color --session=coverage | ||
nox --session=coverage | ||
- name: Create coverage report | ||
run: | | ||
nox --force-color --session=coverage -- xml | ||
nox --session=coverage -- xml | ||
- name: Upload coverage report | ||
uses: codecov/codecov-action@v2.0.2 | ||
uses: codecov/codecov-action@v3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ git clone [email protected]:<your username>/phylm.git | |
cd phylm | ||
``` | ||
|
||
You'll need `python` 3.8 or 3.9 to run this package. You can follow | ||
You'll need `python` 3.8+ to run this package. You can follow | ||
the instructions [here](https://cookiecutter-hypermodern-python.readthedocs.io/en/2021.6.15/guide.html#getting-python) | ||
to install and use these versions. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters