From bc1fc0e14c7588cbead62773d287f80b690d85a3 Mon Sep 17 00:00:00 2001 From: Ernest Guevarra Date: Mon, 5 Aug 2024 01:54:38 +0100 Subject: [PATCH] setup cyclones gha workflow --- .github/workflows/test-targets-cyclones.yml | 38 +++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/test-targets-cyclones.yml diff --git a/.github/workflows/test-targets-cyclones.yml b/.github/workflows/test-targets-cyclones.yml new file mode 100644 index 0000000..f5bf1fa --- /dev/null +++ b/.github/workflows/test-targets-cyclones.yml @@ -0,0 +1,38 @@ +name: test targets cyclones + +on: + pull_request: + branches: [main, master] + workflow_dispatch: + branches: + - '*' + +jobs: + test-targets-cyclones: + runs-on: ubuntu-latest + container: rocker/tidyverse:4.4.1 + steps: + - uses: actions/checkout@v4 + + - name: Install system dependencies + run: | + apt-get update && apt-get install -y --no-install-recommends \ + libxt6 libglpk-dev libpoppler-cpp-dev libmagick++-dev \ + libtesseract-dev libleptonica-dev tesseract-ocr-eng + + - 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(script = "_targets_cyclones.R") + shell: Rscript {0}