Skip to content

Commit

Permalink
test: add macos and windows to CI matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
renan-r-santos committed Apr 6, 2024
1 parent 27742f7 commit 1603025
Show file tree
Hide file tree
Showing 4 changed files with 1,515 additions and 34 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
pixi-version: ["0.18.0"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
runs-on: ubuntu-22.04
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repo
uses: actions/checkout@v4
Expand All @@ -35,11 +36,11 @@ jobs:
- name: Install environment
run: poetry install
- name: Test with nox
run: poetry run nox -s test-${{ matrix.python-version }} integration-${{ matrix.python-version }}
run: poetry run nox -s test-${{ matrix.python-version }} integration-${{ matrix.python-version }}
- name: Store coverage
uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.python-version }}
name: coverage-${{ matrix.python-version }}-${{ matrix.os }}
path: .coverage.*
coverage:
needs: test
Expand Down
5 changes: 3 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import platform
from typing import List

from nox import options, parametrize
Expand All @@ -9,14 +10,14 @@
@session(python=["3.8", "3.9", "3.10", "3.11", "3.12"])
def test(s: Session):
s.install(".", "pytest", "pytest-cov")
s.env["COVERAGE_FILE"] = f".coverage.{s.python}"
s.env["COVERAGE_FILE"] = f".coverage.{s.python}.{platform.system()}"
s.run("python", "-m", "pytest", "--cov", "pixi_kernel")


@session(python=["3.8", "3.9", "3.10", "3.11", "3.12"])
def integration(s: Session):
with s.chdir("tests/integration"):
s.run("pixi", "run", "python", "kernel.py")
s.run("pixi", "run", "python", "kernel.py", external=True)


@session(venv_backend="none")
Expand Down
Loading

0 comments on commit 1603025

Please sign in to comment.