Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Move to setup-micromamba #128

Merged
merged 7 commits into from
Aug 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 36 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,54 @@ on:

jobs:
test:
name: Test
name: Test (Py ${{ matrix.python-version }}${{ matrix.aqs && ', AQS' || '' }})
runs-on: ubuntu-latest
if: github.repository == 'noaa-oar-arl/monetio'
strategy:
matrix:
python-version: ["3.6", "3.8", "3.10"]
python-version: ["3.8", "3.10"]
aqs: [false]
include:
- python-version: "3.6"
aqs: true
- python-version: "3.10"
aqs: true
defaults:
run:
shell: bash -l {0}

steps:
- uses: actions/checkout@v3

- name: Set up Python (micromamba)
uses: mamba-org/provision-with-micromamba@v16
- name: Set up Python (micromamba) [>3.6, no AQS]
if: matrix.python-version != '3.6' && !matrix.aqs
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment-dev.yml
cache-environment: true
create-args: >-
python=${{ matrix.python-version }}

- name: Set up Python (micromamba) [>3.6, AQS]
if: matrix.python-version != '3.6' && matrix.aqs
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment-dev.yml
cache-env: true
extra-specs: |
cache-environment: true
create-args: >-
python=${{ matrix.python-version }}
openssl=1.1.1u

- name: Adjust conda env for Python 3.6
- name: Set up Python (micromamba) [3.6, AQS]
if: matrix.python-version == '3.6'
run: micromamba install attrs=22.2.0
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment-dev.yml
cache-environment: true
create-args: >-
python=${{ matrix.python-version }}
attrs=22.2.0
openssl=1.1.1u

- name: Test with pytest
run: pytest -n auto -v
Expand All @@ -44,15 +68,11 @@ jobs:
pip install https://github.com/noaa-oar-arl/pytspack/archive/master.zip
pytest -n auto -v -k with_pytspack

- name: Downgrade OpenSSL and test AQS
- name: Test AQS
if: matrix.aqs
run: |
micromamba install 'openssl <3'
pytest -n auto -v -k aqs

- name: Restore current openssl
if: success() || failure()
run: micromamba update openssl

docs:
name: Check docs build
runs-on: ubuntu-latest
Expand All @@ -65,10 +85,10 @@ jobs:
- uses: actions/checkout@v3

- name: Set up Python (micromamba)
uses: mamba-org/provision-with-micromamba@v16
uses: mamba-org/setup-micromamba@v1
with:
environment-file: docs/environment-docs.yml
cache-env: true
cache-environment: true

- name: Downgrade OpenSSL (for AQS URL linkcheck)
run: micromamba install 'openssl <3'
Expand Down
2 changes: 1 addition & 1 deletion docs/environment-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ channels:
- conda-forge
- nodefaults
dependencies:
- python=3.9
- python=3.10
#
# core
- dask
Expand Down