Skip to content

Commit

Permalink
add dependecies workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
sorinvoicu committed Mar 13, 2024
1 parent 7e13e0f commit b191fea
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/dependencies.yml
Original file line number Diff line number Diff line change
@@ -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
7 changes: 7 additions & 0 deletions dependencies.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit b191fea

Please sign in to comment.