Test Docu Build (with released pkgs) #955
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
# Workflow based on https://github.com/actions/starter-workflows/blob/main/ci/python-package.yml | |
name: Test Docu Build (with released pkgs) | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
- dev | |
workflow_dispatch: | |
inputs: | |
nbsphinx-execute: | |
description: 'Execute notebooks with nbsphinx' | |
required: false | |
default: 'auto' | |
schedule: | |
- cron: "0 9 * * 1,3,5" | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out the repo containing the docu source | |
uses: actions/checkout@v4 | |
- name: Install graphviz | |
run: sudo apt-get install graphviz | |
- name: Install python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install dependencies and the python package | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Add R repository | |
run: | | |
sudo apt install dirmngr gnupg apt-transport-https ca-certificates software-properties-common | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 | |
sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu jammy-cran40/' | |
- name: Install R | |
run: | | |
sudo apt-get update | |
sudo apt-get install r-base | |
sudo apt-get install r-base-dev | |
sudo apt-get install -y zlib1g-dev libicu-dev pandoc make libcurl4-openssl-dev libssl-dev | |
- name: Get user library folder | |
run: | | |
mkdir ${GITHUB_WORKSPACE}/tmp_r_libs_user | |
echo R_LIBS_USER=${GITHUB_WORKSPACE}/tmp_r_libs_user >> $GITHUB_ENV | |
- name: Query R version | |
run: | | |
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version") | |
shell: Rscript {0} | |
- name: Cache R packages | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.R_LIBS_USER }} | |
key: doubleml-test-build-stable-${{ hashFiles('.github/R-version') }} | |
- name: Install R kernel for Jupyter and the R package DoubleML (dev) | |
run: | | |
install.packages('remotes') | |
remotes::install_cran('DoubleML', dependencies = TRUE) | |
install.packages(c('ggplot2', 'IRkernel', 'xgboost', 'hdm', 'reshape2', 'gridExtra', "igraph", "mlr3filters", "mlr3measures", "did")) | |
IRkernel::installspec() | |
shell: Rscript {0} | |
- name: Build docu with sphinx | |
run: | | |
make -C doc html NBSPHINX_EXECUTE=${{ github.event.inputs.nbsphinx-execute || 'auto' }} | |
- name: Check for broken links / URLs | |
run: | | |
make -C doc linkcheck | |
- name: Upload html artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build_html | |
path: doc/_build/html/ |