Skip to content

JOSS submission (#59) #153

JOSS submission (#59)

JOSS submission (#59) #153

Workflow file for this run

name: "QC 🛠️"
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.10"]
steps:
- uses: actions/checkout@v2
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
miniconda-version: "latest"
python-version: ${{ matrix.python-version }}
activate-environment: torchsurv
- name: Get Date
id: get-date
run: echo "today=$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT
shell: bash
- name: Cache Conda env
uses: actions/cache@v3
with:
path: ${{ env.CONDA }}/envs
key:
conda-${{ runner.os }}--${{ runner.arch }}--${{ steps.get-date.outputs.today }}-${{ hashFiles('dev/environment.yml') }}-${{ env.CACHE_NUMBER }}
env:
# Increase this value to reset cache if environment.yml has not changed
CACHE_NUMBER: 1
- name: Update conda environment
run:
conda env update -n torchsurv -f dev/environment.yml
if: steps.cache.outputs.cache-hit != 'true'
- name: Code QC
shell: bash -l {0}
run: |
conda activate torchsurv
./dev/codeqc.sh check
- name: Tests
shell: bash -l {0}
run: |
conda activate torchsurv
./dev/run-doctests.sh
./dev/run-unittests.sh
- name: Test-build docs
shell: bash -l {0}
run: |
conda activate torchsurv
./dev/build-docs.sh
tar czvf docs.tar.gz -C docs/_build/html .
- name: 'Upload Docs Tarball'
uses: actions/upload-artifact@v4
with:
name: docs.tar.gz
path: docs.tar.gz
retention-days: 5