-
Notifications
You must be signed in to change notification settings - Fork 6
66 lines (57 loc) · 1.98 KB
/
conda-feedstock-check.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
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