Run separate tutorials #30
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run tutorials | |
on: | |
push: | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
jobs: | |
installer: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
sparse-checkout: | | |
docs | |
tests | |
sparse-checkout-cone-mode: false | |
lfs: false | |
- name: Install conda environment dependencies | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
miniforge-version: latest | |
miniforge-variant: Mambaforge | |
python-version: "3.11" | |
mamba-version: "*" | |
channels: conda-forge,bioconda | |
channel-priority: strict | |
activate-environment: JupyText | |
auto-update-conda: true | |
environment-file: tests/conda_tutorials_env.yaml | |
- name: Setup Jupyter kernel | |
run: | | |
python -m ipykernel install --user | |
- name: Run installation notebooks | |
working-directory: ./docs | |
run: ./convert.sh --branch *_install.md | |
- name: Create V-pipe installation archive | |
# HACK this acceleraters upload while preserving Unix-specifics (case sensitivity, file attributes). | |
run: tar --zstd -cvf vpipeinstallation.tar.zst ./docs/vp-analysis | |
- name: Keep installation | |
uses: actions/upload-artifact@v3 | |
with: | |
name: VPipeInstallation | |
path: vpipeinstallation.tar | |
if-no-files-found: error | |
- name: Save notebooks | |
uses: actions/upload-artifact@v3 | |
with: | |
name: JupyterNotebooks | |
path: ./docs/*.ipynb | |
tutorial: | |
strategy: | |
max-parallel: 5 | |
fail-fast: false | |
matrix: | |
virus: ["hiv", "sarscov2"] | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
sparse-checkout: | | |
docs | |
tests | |
sparse-checkout-cone-mode: false | |
lfs: false | |
- name: Reuse installation | |
uses: actions/download-artifact@v2 | |
with: | |
name: VPipeInstallation | |
- name: Extract V-pipe installation archive | |
run: tar --zstd -xvf vpipeinstallation.tar | |
- name: Install conda environment dependencies | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
miniforge-version: latest | |
miniforge-variant: Mambaforge | |
python-version: "3.11" | |
mamba-version: "*" | |
channels: conda-forge,bioconda | |
channel-priority: strict | |
activate-environment: JupyText | |
auto-update-conda: true | |
environment-file: tests/conda_tutorials_env.yaml | |
- name: Setup Jupyter kernel | |
run: | | |
python -m ipykernel install --user | |
- name: Run analysis notebooks | |
working-directory: ./docs | |
run: ./convert.sh --branch tutorial*_${{ matrix.virus }}.md | |
- name: Save notebooks | |
uses: actions/upload-artifact@v3 | |
with: | |
name: JupyterNotebooks | |
path: ./docs/*.ipynb | |
# - name: Publish | |
# uses: peaceiris/actions-gh-pages@v3 | |
# with: | |
# github_token: ${{ secrets.GITHUB_TOKEN }} | |
# publish_dir: ./docs |