From bb9411959ee8a986a8c64418c01f2daa4f156140 Mon Sep 17 00:00:00 2001 From: Michael Milton Date: Fri, 13 Dec 2024 14:56:52 +1100 Subject: [PATCH] Run Slurm in the CI --- .github/workflows/README.md | 8 ++++---- .github/workflows/sandpaper-main.yaml | 11 +++++++++++ .github/workflows/sandpaper-version.txt | 2 +- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/workflows/README.md b/.github/workflows/README.md index 7076ddd9..d6edf88d 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -2,7 +2,7 @@ This directory contains workflows to be used for Lessons using the {sandpaper} lesson infrastructure. Two of these workflows require R (`sandpaper-main.yaml` -and `pr-receive.yaml`) and the rest are bots to handle pull request management. +and `pr-recieve.yaml`) and the rest are bots to handle pull request management. These workflows will likely change as {sandpaper} evolves, so it is important to keep them up-to-date. To do this in your lesson you can do the following in your @@ -94,7 +94,7 @@ branch called `update/workflows` and a pull request is created. Maintainers are encouraged to review the changes and accept the pull request if the outputs are okay. -This update is run weekly or on demand. +This update is run ~~weekly or~~ on demand. ### 03 Maintain: Update Package Cache (update-cache.yaml) @@ -140,7 +140,7 @@ Once the checks are finished, a comment is issued to the pull request, which will allow maintainers to determine if it is safe to run the "Receive Pull Request" workflow from new contributors. -### Receive Pull Request (pr-receive.yaml) +### Recieve Pull Request (pr-recieve.yaml) **Note of caution:** This workflow runs arbitrary code by anyone who creates a pull request. GitHub has safeguarded the token used in this workflow to have no @@ -171,7 +171,7 @@ The artifacts produced are used by the next workflow. ### Comment on Pull Request (pr-comment.yaml) -This workflow is triggered if the `pr-receive.yaml` workflow is successful. +This workflow is triggered if the `pr-recieve.yaml` workflow is successful. The steps in this workflow are: 1. Test if the workflow is valid and comment the validity of the workflow to the diff --git a/.github/workflows/sandpaper-main.yaml b/.github/workflows/sandpaper-main.yaml index e17707ac..25026ff7 100644 --- a/.github/workflows/sandpaper-main.yaml +++ b/.github/workflows/sandpaper-main.yaml @@ -29,6 +29,14 @@ jobs: env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} RENV_PATHS_ROOT: ~/.local/share/renv/ + services: + mysql: + image: mysql:8.0 + env: + MYSQL_ROOT_PASSWORD: root + ports: + - "8888:3306" + options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 steps: - name: "Checkout Lesson" @@ -53,6 +61,9 @@ jobs: with: cache-version: ${{ secrets.CACHE_VERSION }} + - name: Setup slurm + uses: koesterlab/setup-slurm-action@v1 + - name: "Deploy Site" run: | reset <- "${{ github.event.inputs.reset }}" == "true" diff --git a/.github/workflows/sandpaper-version.txt b/.github/workflows/sandpaper-version.txt index 19270385..930e3000 100644 --- a/.github/workflows/sandpaper-version.txt +++ b/.github/workflows/sandpaper-version.txt @@ -1 +1 @@ -0.16.5 +0.14.1