Browse Source

Add CI to test conda workflow + macos

- Add artifact upload to action, ensure runs even if build fails
- Only upload tracebacks in gh artifact.
- Update deps in environment.yml and requirements.txt
pull/127/head
Ross Barnowski 6 months ago
parent
commit
3b7969238a
  1. 52
      .github/workflows/conda.yml
  2. 10
      environment.yml
  3. 2
      requirements.txt

52
.github/workflows/conda.yml

@ -0,0 +1,52 @@
name: Build site
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
# NOTE: Gym/atari deps need to be solved for this to work on windows
os: [ubuntu, macos] #, windows]
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
activate-environment: numpy-tutorials
environment-file: environment.yml
miniforge-variant: Mambaforge
miniforge-version: latest
use-mamba: true
python-version: "3.10"
auto-activate-base: false
- name: inspect and build
id: build_step
continue-on-error: true
run: |
conda info
conda list
make -C site/ SPHINXOPTS="-nWT --keep-going" html
- uses: actions/upload-artifact@v2
with:
name: sphinx-build-artifact
path: site/_build/html/reports
- name: fail on build errors
if: steps.build_step.outcome != 'success'
run: exit 1

10
environment.yml

@ -2,16 +2,20 @@ name: numpy-tutorials
channels:
- conda-forge
dependencies:
# For running the tutorials
- numpy
- scipy
- matplotlib
- pandas
- pytest
- nbval
- statsmodels
- pip
- imageio
- pooch
- ffmpeg # For gym/atari
# For building the site
- sphinx
- myst-nb
- sphinx-book-theme
- sphinx-copybutton
- pip:
- gym[atari]==0.19
- -r site/requirements.txt

2
requirements.txt

@ -3,8 +3,6 @@ numpy
scipy
matplotlib
pandas
pytest
nbval
statsmodels
imageio
gym==0.18.3

Loading…
Cancel
Save