From d727b3671fc0a44f00da945c7bc6f2840448be3f Mon Sep 17 00:00:00 2001 From: Luis Moris Fernandez Date: Mon, 26 Aug 2024 22:39:46 +0200 Subject: [PATCH] Restablish CI workflow --- ci.yml => .github/workflows/ci.yml | 0 .github/workflows/mytest.yml | 50 ------------------------------ build.R | 49 ----------------------------- 3 files changed, 99 deletions(-) rename ci.yml => .github/workflows/ci.yml (100%) delete mode 100644 .github/workflows/mytest.yml delete mode 100644 build.R diff --git a/ci.yml b/.github/workflows/ci.yml similarity index 100% rename from ci.yml rename to .github/workflows/ci.yml diff --git a/.github/workflows/mytest.yml b/.github/workflows/mytest.yml deleted file mode 100644 index 6af961d..0000000 --- a/.github/workflows/mytest.yml +++ /dev/null @@ -1,50 +0,0 @@ ---- -name: Test and QC 🧪 - -on: - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review - branches: - - main - push: - branches: - - main - workflow_dispatch: - -concurrency: - group: test-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -env: - TEMPLATE_REF: main - TEMPLATE_REPO: boehringer-ingelheim/dv.templates - -jobs: - test: - name: ${{ vars.CI_IMAGE }} - runs-on: ubuntu-latest - container: - image: ${{ vars.CI_IMAGE }} - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - - steps: - - name: Checkout project ⬇️ - uses: actions/checkout@v4 - - - name: Install package dependencies 📄 - uses: boehringer-ingelheim/dv.templates/.github/actions/dependencies@main - - - name: Test and QC2 🧪 - run: Rscript build.R - - - name: Archive snap results ⬆️ - uses: actions/upload-artifact@v4 - with: - name: snap_results - path: tests/testthat/_snaps - \ No newline at end of file diff --git a/build.R b/build.R deleted file mode 100644 index e5c2861..0000000 --- a/build.R +++ /dev/null @@ -1,49 +0,0 @@ -#! /usr/local/bin/Rscript - -success <- c( - test = FALSE, - valdoc = FALSE -) - -# Getting package information ---- -pkg_name <- read.dcf("DESCRIPTION")[1, "Package"] -pkg_version <- read.dcf("DESCRIPTION")[1, "Version"] - -# Building ---- - -message("############################") -message("###### INSTALLING (S) ######") -message("############################") - -devtools::install(upgrade = FALSE, args = "--install-tests") - -message("############################") -message("###### INSTALLING (F) ######") -message("############################") - -# Testing ---- - -message("##########################") -message("###### TESTING (S) ######") -message("##########################") - - - - - -test_results <- tibble::as_tibble( - withr::with_envvar( - new = list(CI = TRUE, no_proxy = "127.0.0.1", NOT_CRAN = TRUE, TESTTHAT_CPUS = 1), - code = { - testthat::set_max_fails(Inf) - devtools::test() - } - ) -) - -success[["test"]] <- sum(test_results[["failed"]]) == 0 - -message("##########################") -message("###### TESTING (F) ######") -message("##########################") -