Skip to content

Commit

Permalink
Merge pull request #23 from cclauss/GitHub_Actions
Browse files Browse the repository at this point in the history
Add a GitHub Action to run nox and pytest on current Python
  • Loading branch information
chrysle committed Nov 12, 2023
2 parents df7530e + f210e8f commit b0a98d0
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
22 changes: 22 additions & 0 deletions .github/workflows/nox.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: nox
on: [push, pull_request]
jobs:
nox:
strategy:
fail-fast: false
max-parallel: 3
matrix:
os: [ubuntu-latest] # [macos-latest, ubuntu-latest, windows-latest]
python: ['3.8', '3.10', '3.12']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- run: python3 --version && python --version
- run: pip install --upgrade pip setuptools
- run: pip install nox pytest virtualenv
- run: pytest . || true # See pytest's warnings
- run: nox --python ${{ matrix.python }}
# - run: nox --python ${{ matrix.python }} --report report.json && python report_to_table.py
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

# -- REQUIRES: nox >= 2018.10.17
# SEE: https://nox.readthedocs.io/en/stable/index.html
USE_PYTHON_VERSIONS_DEFAULT = ["2.7", "3.7"]
USE_PYTHON_VERSIONS_DEFAULT = ["3.8", "3.10", "3.12"]
USE_PYTHON_VERSIONS = os.environ.get("NOXFILE_PYTHON_VERSIONS", "").split()
if not USE_PYTHON_VERSIONS:
USE_PYTHON_VERSIONS = USE_PYTHON_VERSIONS_DEFAULT
Expand Down

0 comments on commit b0a98d0

Please sign in to comment.