Skip to content

Commit

Permalink
dynamic python version
Browse files Browse the repository at this point in the history
  • Loading branch information
eringrant committed Jan 3, 2024
1 parent 5507d6b commit db93b38
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 3 deletions.
15 changes: 14 additions & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,24 @@ on:
- "tests/**"

jobs:
get-python-versions:
runs-on: ubuntu-latest
outputs:
python-matrix: ${{ steps.get-python-versions-action.outputs.latest-python-versions }}

steps:
- uses: snok/latest-python-versions@v1
id: get-python-versions-action
with:
min-version: 3.11
include-prereleases: false

test:
needs: get-python-versions
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.11]
python-version: ${{ fromJson(needs.get-python-versions.outputs.python-matrix) }}

steps:
- uses: actions/checkout@v3
Expand Down
15 changes: 14 additions & 1 deletion .github/workflows/python-package-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,24 @@ on:
- "setup.cfg"

jobs:
get-python-versions:
runs-on: ubuntu-latest
outputs:
python-matrix: ${{ steps.get-python-versions-action.outputs.latest-python-versions }}

steps:
- uses: snok/latest-python-versions@v1
id: get-python-versions-action
with:
min-version: 3.11
include-prereleases: false

build-linux:
needs: get-python-versions
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.11]
python-version: ${{ fromJson(needs.get-python-versions.outputs.python-matrix) }}
environment-file: [environment-cpu.yml]

steps:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[tool.black]
target-version = ['py311']
target-version = ['py311', 'py312']
line-length = 88
include = '\.pyi?$'
exclude = '''
Expand Down

0 comments on commit db93b38

Please sign in to comment.