Skip to content

Commit

Permalink
Merge pull request #189 from ocefpaf/fix_micromamba
Browse files Browse the repository at this point in the history
Fix micromamba
  • Loading branch information
ocefpaf authored Nov 7, 2024
2 parents 3325389 + 4515482 commit 6202ece
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 32 deletions.
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ updates:
interval: "daily"
labels:
- "Bot"
groups:
github-actions:
patterns:
- '*'
30 changes: 13 additions & 17 deletions .github/workflows/test_code_generation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,26 @@ on:
push:
branches: [main]

defaults:
run:
shell: bash

jobs:
code-generation:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}

steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/checkout@v4

- name: Setup Micromamba
uses: mamba-org/setup-micromamba@v2
- name: Set up Python
uses: actions/setup-python@v5
with:
environment-name: TEST
init-shell: bash
create-args: >-
python=3
python-build
numpy
--file requirements-dev.txt
--channel conda-forge
python-version: "3.x"

- name: Install gsw
run: >
python -m pip install -r requirements-dev.txt
&& python -m pip install -e .
- name: Test Code Generation
run: >
Expand Down
29 changes: 14 additions & 15 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,37 @@ on:
push:
branches: [main]

defaults:
run:
shell: bash

jobs:
run:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
os: [ windows-latest, ubuntu-latest, macos-latest ]
# Oldest one based on NEP-29 and latest one.
# See https://numpy.org/neps/nep-0029-deprecation_policy.html
numpy-version: ["1.23", "1.26"]
# https://scientific-python.org/specs/spec-0000/
numpy-version: ["==1.24", ">=2"]
exclude:
- python-version: "3.12"
numpy-version: "1.23"
numpy-version: "==1.24"
fail-fast: false
defaults:
run:
shell: bash -l {0}

steps:
- uses: actions/checkout@v4

- name: Setup Micromamba Python ${{ matrix.python-version }} numpy ${{ matrix.numpy-version }}
uses: mamba-org/setup-micromamba@v2
- name: Set up Python
uses: actions/setup-python@v5
with:
environment-name: TEST
init-shell: bash
create-args: >-
python=${{ matrix.python-version }} python-build numpy=${{ matrix.numpy-version }} --file requirements-dev.txt --channel conda-forge
python-version: ${{ matrix.python-version }}

- name: Install gsw
run: |
python -m pip install -e . --no-deps --force-reinstall
run: >
python -m pip install -r requirements-dev.txt
&& python -m pip install -e .
&& python -m pip install numpy${{ matrix.numpy-version }}
- name: Tests
run: |
Expand Down

0 comments on commit 6202ece

Please sign in to comment.