From b0a0b0f42c0d73c1a5c7047f3a7f7e0659872859 Mon Sep 17 00:00:00 2001 From: Ecnama <147094159+Ecnama@users.noreply.github.com> Date: Fri, 29 Nov 2024 21:33:53 +0100 Subject: [PATCH] First attempt at creating automated tests --- .github/workflows/r-tests.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/r-tests.yml diff --git a/.github/workflows/r-tests.yml b/.github/workflows/r-tests.yml new file mode 100644 index 0000000..d2bf6e6 --- /dev/null +++ b/.github/workflows/r-tests.yml @@ -0,0 +1,33 @@ +name: R Tests + +on: + push: + branches: + - main + - dev + pull_request: + branches: + - main + - dev + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Setup R environment + uses: r-lib/actions/setup-r@v2 + with: + r-version: 'latest' + + - name: Install dependencies + run: | + Rscript -e 'install.packages("devtools")' + Rscript -e 'devtools::install_deps(dep = TRUE)' + + - name: Run R tests + run: | + Rscript -e 'devtools::test()'