Skip to content

CI: Move to setup-micromamba #367

CI: Move to setup-micromamba

CI: Move to setup-micromamba #367

Workflow file for this run

name: CI
on:
push:
branches: [stable, develop]
pull_request:
branches: [stable, develop]
workflow_dispatch:
schedule:
- cron: "0 12 * * 1"
jobs:
test:
name: Test
runs-on: ubuntu-latest
if: github.repository == 'noaa-oar-arl/monetio'
strategy:
matrix:
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) [${{ matrix.python-version }}, no AQS]
if: matrix.python-version != '3.6' && matrix.aqs == false
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) [${{ matrix.python-version }}, AQS]
if: matrix.python-version != '3.6' && matrix.aqs == true
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment-dev.yml
cache-environment: true
create-args: >-
python=${{ matrix.python-version }}
openssl=1.1.1u
- name: Set up Python (micromamba) [3.6, AQS]
if: matrix.python-version == '3.6'
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
- name: Test with pytspack installed
run: |
pip install https://github.com/noaa-oar-arl/pytspack/archive/master.zip
pytest -n auto -v -k with_pytspack
- name: Test AQS
if: matrix.aqs == true
run: |
pytest -n auto -v -k aqs
docs:
name: Check docs build
runs-on: ubuntu-latest
if: github.repository == 'noaa-oar-arl/monetio'
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v3
- name: Set up Python (micromamba)
uses: mamba-org/setup-micromamba@v1
with:
environment-file: docs/environment-docs.yml
cache-environment: true
- name: Downgrade OpenSSL (for AQS URL linkcheck)
run: micromamba install 'openssl <3'
- name: linkcheck
run: sphinx-build -b linkcheck docs docs/_build/linkcheck
- name: sphinx-build -W
run: sphinx-build -b html -W docs docs/_build/html