Skip to content

Merge pull request #1 from OxfordIHTM/dev #3

Merge pull request #1 from OxfordIHTM/dev

Merge pull request #1 from OxfordIHTM/dev #3

name: test targets workflow
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
workflow_dispatch:
# branches:
# - '*'
jobs:
test-targets-workflow:
runs-on: ubuntu-latest
container: rocker/tidyverse:4.3.3
env:
GIT_CRYPT_KEY64: ${{ secrets.GIT_CRYPT_KEY64 }}
steps:
- uses: actions/checkout@v4
- name: Install system dependencies
run: |
apt-get update && apt-get install -y --no-install-recommends \
libxt6 libglpk-dev
- name: Trust git repo
run: |
git config --global --add safe.directory /__w/ihtm-targets-template/ihtm-targets-template
- name: Install packages from renv.lock (with cache)
if: ${{ !env.ACT }}
uses: r-lib/actions/setup-renv@v2
with:
cache-version: 2
- name: Install packages from renv.lock (local, no cache)
if: ${{ env.ACT }}
run: |
renv::restore()
shell: Rscript {0}
- name: Run workflow
run: |
targets::tar_make()
shell: Rscript {0}