Skip to content

Commit

Permalink
Initiate reusable workflow file
Browse files Browse the repository at this point in the history
  • Loading branch information
msberends authored Jun 28, 2022
1 parent 75a260a commit 9258c05
Showing 1 changed file with 82 additions and 0 deletions.
82 changes: 82 additions & 0 deletions .github/workflows/reusable-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# ===================================================================== #
# An R package by Certe: #
# https://github.com/certe-medical-epidemiology #
# #
# Licensed as GPL-v2.0. #
# #
# Developed at non-profit organisation Certe Medical Diagnostics & #
# Advice, department of Medical Epidemiology. #
# #
# This R package is free software; you can freely use and distribute #
# it for both personal and commercial purposes under the terms of the #
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
# the Free Software Foundation. #
# #
# We created this package for both routine data analysis and academic #
# research and it was publicly released in the hope that it will be #
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# ===================================================================== #

# Remember that R-universe will hourly build binaries for macOS and Windows:
# https://certe-medical-epidemiology.r-universe.dev

on:
worflow_call:

name: R-CMD-check

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}
continue-on-error: ${{ matrix.config.allowfail }}
name: ${{ matrix.config.os }} (R-${{ matrix.config.r }})
strategy:
fail-fast: false
matrix:
config:
- {os: ubuntu-latest, r: 'devel', allowfail: true}
- {os: ubuntu-latest, r: '4.2', allowfail: false}
- {os: macOS-latest, r: '4.2', allowfail: false}
- {os: windows-latest, r: '4.2', allowfail: false}
- {os: ubuntu-latest, r: '4.1', allowfail: false}
- {os: macOS-latest, r: '4.1', allowfail: false}
- {os: windows-latest, r: '4.1', allowfail: false}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v2

- name: Install gdal on macOS for sf-related parts
if: runner.os == 'macOS'
run: |
brew install proj
brew install gdal
brew link --overwrite gcc
shell: bash

- name: Generate Dutch language files for examples
if: runner.os == 'Linux'
run: |
sudo locale-gen nl_NL
sudo locale-gen nl_NL.UTF-8
sudo update-locale
- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
# use RStudio Package Manager to quickly install packages
use-public-rspm: true
# add our own R-universe to install other Certe packages
extra-repositories: 'https://certe-medical-epidemiology.r-universe.dev'

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@v2

0 comments on commit 9258c05

Please sign in to comment.