From b191fea403c658b6827f72985a6c6d5cb7850cc1 Mon Sep 17 00:00:00 2001 From: sorinvoicu <61691256+sorinvoicu@users.noreply.github.com> Date: Wed, 13 Mar 2024 15:51:14 +0000 Subject: [PATCH] add dependecies workflow --- .github/workflows/check.yml | 2 +- .github/workflows/dependencies.yml | 45 ++++++++++++++++++++++++++++++ dependencies.yml | 7 +++++ 3 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/dependencies.yml create mode 100644 dependencies.yml diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index dfd560a..cc90556 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -38,7 +38,7 @@ jobs: - name: Test ๐Ÿงช if: > - !contains(github.event.commits[0].message, '[skip ci-tests]') && github.event.pull_request.draft == false + !contains(github.event.commits[0].message, '[skip tests]') && github.event.pull_request.draft == false run: | options(crayon.enabled = TRUE) devtools::test() diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml new file mode 100644 index 0000000..ab96c76 --- /dev/null +++ b/.github/workflows/dependencies.yml @@ -0,0 +1,45 @@ +--- +name: Dependencies ๐Ÿ“„ + +on: + pull_request: + types: + - opened + - synchronize + - reopened + - ready_for_review + branches: + - main + push: + branches: + - main + workflow_call: + +concurrency: + group: dependencies-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + dependencies: + name: ${{ vars.CI_IMAGE }} + runs-on: ubuntu-latest + container: + image: ${{ vars.CI_IMAGE }} + + steps: + - name: Checkout project โฌ‡๏ธ + uses: actions/checkout@v4 + with: + path: ${{ github.event.repository.name }} + + - name: Install package dependencies ๐Ÿ“„ + run: | + if (file.exists(${PATH})) { + yaml::yaml.load(readLines(${PATH}))$dependencies |> + sapply(function(x) x$repo) |> + pak::pak(dependencies = TRUE, ask = FALSE, upgrade = FALSE) + } + shell: Rscript {0} + working-directory: ${{ github.event.repository.name }} + env: + PATH: ./dependencies.yml diff --git a/dependencies.yml b/dependencies.yml new file mode 100644 index 0000000..ef77848 --- /dev/null +++ b/dependencies.yml @@ -0,0 +1,7 @@ +# use pak source reference to define fluid dependencies +# https://pak.r-lib.org/reference/pak_package_sources.html +dependencies: + dv.filter: + repo: github::boehringer-ingelheim/dv.filter@main + dv.loader: + repo: github::boehringer-ingelheim/dv.loader@main