Skip to content

Commit

Permalink
Update CI to use pixi as well
Browse files Browse the repository at this point in the history
  • Loading branch information
deltamarnix committed Oct 8, 2024
1 parent 0eced4a commit 4f16275
Show file tree
Hide file tree
Showing 3 changed files with 1,598 additions and 171 deletions.
46 changes: 19 additions & 27 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,15 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
- name: Setup pixi
uses: prefix-dev/setup-[email protected]
with:
python-version: 3.9
cache: 'pip'
cache-dependency-path: pyproject.toml

- name: Install Python packages
run: pip install ".[lint]"
pixi-version: v0.32.0
environments: dev
activate-environment: true

- name: Run ruff
run: ruff check .
run: pixi run lint

build:
name: Build
Expand All @@ -41,22 +38,18 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v5
- name: Setup pixi
uses: prefix-dev/setup-[email protected]
with:
python-version: 3.9

- name: Install Python packages
run: |
pip install --upgrade pip
pip install build twine
pip --verbose install .
pixi-version: v0.32.0
environments: dev
activate-environment: true

- name: Print package version
run: python -c "from flopy4 import version; print(version.__version__)"

- name: Build package
run: python -m build
run: pixi run build

test:
name: Test
Expand All @@ -68,7 +61,7 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-22.04, macos-12, windows-2022 ]
python: [ 3.9, "3.10", "3.11", "3.12" ]
python: [ "310", "311", "312" ]
env:
GCC_V: 11
steps:
Expand All @@ -81,13 +74,12 @@ jobs:
with:
repo: modflow6-nightly-build

- name: Setup Python
uses: actions/setup-python@v5
- name: Setup pixi
uses: prefix-dev/setup-[email protected]
with:
python-version: ${{ matrix.python }}

- name: Install Python packages
run: pip install ".[test]"
pixi-version: v0.32.0
environments: test${{ matrix.python }}
activate-environment: true

- name: Run tests
run: pytest -v -n auto
run: pixi run test
Loading

0 comments on commit 4f16275

Please sign in to comment.