Tests for Monitor Normalisation: #2495
Workflow file for this run
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: Build docs | |
on: | |
push: | |
branches: | |
- 'main' | |
- 'release-*' | |
pull_request: | |
release: | |
merge_group: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Get Date | |
id: get-date | |
run: | | |
echo "date=$(/bin/date -u "+%Y%V")" >> $GITHUB_OUTPUT | |
shell: bash | |
- name: Cache Mambaforge and Pip packages | |
uses: actions/cache@v4 | |
env: | |
CACHE_NUMBER: 0 | |
with: | |
path: | | |
~/conda_pkgs_dir | |
~/.cache/pip | |
key: | |
${{runner.os}}-condapkg-${{env.CACHE_NUMBER}}-${{steps.get-date.outputs.date}}-${{hashFiles('environment-dev.yml','conda/meta.yaml')}} | |
- name: Cache Mambaforge environment | |
uses: actions/cache@v4 | |
id: cache-mambaforge-environment | |
env: | |
CACHE_NUMBER: 0 | |
with: | |
path: ${CONDA}/envs/mantidimaging-dev.cache | |
key: | |
${{runner.os}}-condaenv-${{env.CACHE_NUMBER}}-${{steps.get-date.outputs.date}}-${{hashFiles('environment-dev.yml','conda/meta.yaml')}} | |
- name: Setup Mambaforge | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
miniforge-version: latest | |
miniforge-variant: Mambaforge | |
activate-environment: mantidimaging-dev | |
auto-activate-base: false | |
use-mamba: true | |
- name: Mantid Imaging developer dependencies | |
if: steps.cache-mambaforge-environment.outputs.cache-hit != 'true' | |
shell: bash -l {0} | |
run: | | |
conda deactivate | |
python3 ./setup.py create_dev_env | |
cp -Ta ${CONDA}/envs/mantidimaging-dev ${CONDA}/envs/mantidimaging-dev.cache | |
- name: Mantid Imaging developer dependencies - from cache | |
if: steps.cache-mambaforge-environment.outputs.cache-hit == 'true' | |
shell: bash -l {0} | |
run: | | |
cp -Ta ${CONDA}/envs/mantidimaging-dev.cache ${CONDA}/envs/mantidimaging-dev | |
- name: docs | |
shell: bash -l {0} | |
run: | | |
make build-docs | |
- name: publish docs | |
if: github.ref == 'refs/heads/main' | |
uses: ./.github/actions/publish-docs | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: publish docs release | |
if: startsWith(github.ref, 'refs/heads/release') | |
uses: ./.github/actions/publish-docs | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
dir_name: ${{ github.ref_name }} |