Skip to content

Conda feedstock test #4

Conda feedstock test

Conda feedstock test #4

name: Conda feedstock test
# this workflow generate the documentation, using conda-feedstock
on:
workflow_dispatch:
schedule:
- cron: '00 23 * * 0'
jobs:
dynamic-matrix:
# from https://michaelheap.com/dynamic-matrix-generation-github-actions/
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: get-matrix
run: |
echo "get matrix for event ${{ github.event_name }}"
echo "::echo::on"
python .github/actions/dynamic_matrix.py ${{ github.event_name }}
outputs:
os_matrix: ${{ steps.get-matrix.outputs.os_matrix }}
python_version_matrix: ${{ steps.get-matrix.outputs.python_version_matrix }}
build:
needs: dynamic-matrix
strategy:
fail-fast: false
matrix:
os: ${{ fromJson(needs.dynamic-matrix.outputs.os_matrix) }}
python-version: ${{ fromJson(needs.dynamic-matrix.outputs.python_version_matrix) }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
name: python ${{ matrix.python-version }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Strip python version
run: cat ci/requirements/environment.yaml | egrep -vw python > environment-nopython.yml
- uses: mamba-org/setup-micromamba@v2
with:
environment-file: ${{ env.CONDA_ENV_FILE }}
environment-name: xsarsea-tests
cache-environment: true
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{matrix.python-version}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
create-args: >-
python=${{matrix.python-version}}
- name: install xsarsea from feedstock
run: |
conda install -c conda-forge xsarsea
(cd docs ; pip install -r ../requirements.txt)
- name: List Packages
run: |
python -V
conda info
conda list
- name: Documentation test
run: |
cd docs
make html