Skip to content

Commit

Permalink
🏝️ Create a nox -s venv session for wheel entry points
Browse files Browse the repository at this point in the history
  • Loading branch information
agriyakhetarpal committed Jan 2, 2024
1 parent e849f41 commit 9a39767
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 19 deletions.
22 changes: 3 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,27 +49,11 @@ jobs:
run: choco install mingw

- name: Install Python dependencies
run: python -m pip install build virtualenv
run: python -m pip install build virtualenv nox

- name: Build binary distribution (wheel)
run: |
python -m build --wheel . --outdir dist/
- name: Test entry points for package for macOS and Linux
if: matrix.runs-on != 'windows-latest'
run: |
python -m virtualenv venv
source venv/bin/activate
python -m pip install dist/*.whl
hugo version
hugo env --logLevel debug
- name: Test entry points for package for Windows
if: matrix.runs-on == 'windows-latest'
shell: bash
run: |
python -m virtualenv venv
venv\Scripts\activate
python -m pip install dist\*.whl
hugo version
hugo env --logLevel debug
- name: Test entry points for package
run: nox -s venv
9 changes: 9 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,12 @@ def release(session: nox.Session) -> None:

session.install("build")
session.run("python", "-m", "build")


@nox.session(name="venv")
def venv(session: nox.Session) -> None:
"""Create a virtual environment and install wheels from the dist/ folder into it."""
for file in DIR.joinpath("dist").glob("*.whl"):
session.install(file)
session.run("hugo", "version")
session.run("hugo", "env", "--logLevel", "debug")

0 comments on commit 9a39767

Please sign in to comment.