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

Extract Python version for pre-releases #48

Merged
merged 1 commit into from
Jan 19, 2023
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: 16 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ jobs:
- "3.9"
- "3.10"
- "3.11"
- "~3.12.0-0"
continue-on-error: >-
${{ contains(matrix.python-version, '~') && true || false }}

steps:
- uses: actions/checkout@v3
Expand All @@ -39,7 +42,17 @@ jobs:
python-version: ${{ matrix.python-version }}
- run: python -m pip install --upgrade wheel nox

- run: python -m nox --python ${{ matrix.python-version }} --tags tests
- name: Determine Python version for Nox
run: |
V=${{ matrix.python-version }}
if [[ "$V" = ~* ]]; then
# Extract version from a '~3.XX.0-0' specifier.
V=${V:1:4}
fi

echo NOX_PYTHON=$V >>$GITHUB_ENV

- run: python -Im nox --python ${{ env.NOX_PYTHON }} --tags tests

- name: Upload coverage data
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -95,7 +108,7 @@ jobs:
python-version: "3.10"
- run: python -m pip install --upgrade wheel nox

- run: python -m nox -e docs
- run: python -Im nox -e docs

package:
name: Build & verify package
Expand Down Expand Up @@ -133,7 +146,7 @@ jobs:
python-version: ${{env.PYTHON_LATEST}}
- run: python -m pip install -e .[dev]
- run: python -c 'import environ; print(environ.__version__)'
#

# Ensure everything required is passing for branch protection.
required-checks-pass:
if: always()
Expand Down
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def tests_cov(session: nox.Session) -> None:
_cov(session)


@nox.session(python=["3.8", "3.9", "3.10"], tags=["tests"])
@nox.session(python=["3.8", "3.9", "3.10", "3.12"], tags=["tests"])
def tests(session: nox.Session) -> None:
session.install(".[tests]")

Expand Down