Skip to content

Commit

Permalink
Merge branch 'main' into 207-length-DTC-varaible
Browse files Browse the repository at this point in the history
  • Loading branch information
cpiraux committed Feb 15, 2024
2 parents 987c7b2 + 87c2127 commit 8ff1753
Show file tree
Hide file tree
Showing 25 changed files with 172 additions and 328 deletions.
38 changes: 0 additions & 38 deletions .github/workflows/check-links.yml

This file was deleted.

42 changes: 30 additions & 12 deletions .github/workflows/check-standard.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,34 @@
---
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
name: R-CMD-check 📦

on:
# 'push' events are triggered when commits
# are pushed to one of these branches
push:
branches:
- main
tags:
- "v*"
# 'pull_request' events are triggered when PRs are
# created against one of these target branches.
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
branches:
- main
# 'workflow_dispatch' gives you the ability
# to run this workflow on demand, anytime
workflow_dispatch:

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

check:
name: ${{ matrix.config.os }} (${{ matrix.config.r }})

runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
Expand All @@ -25,24 +38,29 @@ jobs:
- { os: ubuntu-latest, r: "devel", http-user-agent: "release" }
- { os: ubuntu-latest, r: "release" }
- { os: ubuntu-latest, r: "oldrel-1" }

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

if: >
!contains(github.event.commits[0].message, '[skip checks]')
steps:
- uses: actions/checkout@v3
- name: Checkout repository 🛎
uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2
- name: Install Pandoc
uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
- name: Setup R 📊
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
- name: Install R package dependencies 📦
uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: rcmdcheck
extra-packages: any::rcmdcheck

- uses: r-lib/actions/check-r-package@v2
- name: Run R CMD check 🎯
uses: r-lib/actions/check-r-package@v2
113 changes: 113 additions & 0 deletions .github/workflows/common.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
---
name: xportr CI/CD Workflows

on:
# 'push' events are triggered when commits
# are pushed to one of these branches
push:
branches:
- main
tags:
- "v*"
# 'pull_request' events are triggered when PRs are
# created against one of these target branches.
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
branches:
- main
# 'workflow_dispatch' gives you the ability
# to run this workflow on demand, anytime
workflow_dispatch:

concurrency:
group: common-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
R_VERSION: "release"

jobs:
# Get R version from environmental variable
# and use it in downstream jobs
get_r_version:
name: Get R version
runs-on: ubuntu-latest
outputs:
r-version: ${{ steps.get_r_version.outputs.R_VERSION }}
steps:
- name: Get R Version for Downstream Container Jobs
id: get_r_version
run: echo "R_VERSION=$R_VERSION" >> $GITHUB_OUTPUT
shell: bash

# Test code coverage of R Package
coverage:
name: Code Coverage
uses: pharmaverse/admiralci/.github/workflows/code-coverage.yml@main
if: >
github.event_name != 'release'
needs: get_r_version
with:
r-version: "${{ needs.get_r_version.outputs.r-version }}"
# Whether to skip code coverage badge creation
# Setting to 'false' will require you to create
# an orphan branch called 'badges' in your repository
skip-coverage-badges: true

# Ensure that styling guidelines are followed
style:
name: Code Style
uses: pharmaverse/admiralci/.github/workflows/style.yml@main
if: github.event_name == 'pull_request'
needs: get_r_version
with:
r-version: "${{ needs.get_r_version.outputs.r-version }}"

# Ensure there are no broken URLs in the package documentation
links:
name: Links
uses: pharmaverse/admiralci/.github/workflows/links.yml@main
if: github.event_name == 'pull_request'

# Build the website and deploy to `gh-pages` branch
site:
name: Documentation
uses: pharmaverse/admiralci/.github/workflows/pkgdown.yml@main
if: github.event_name == 'push' || startsWith(github.ref, 'refs/tags/v')
needs: get_r_version
with:
r-version: "release"
skip-multiversion-docs: true
secrets:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

# Ensure there are no linter errors in the package
linter:
name: Lint
uses: pharmaverse/admiralci/.github/workflows/lintr.yml@main
if: github.event_name == 'pull_request'
needs: get_r_version
with:
r-version: "${{ needs.get_r_version.outputs.r-version }}"

# Ensure there are no spelling errors in the package
spellcheck:
name: Spelling
uses: pharmaverse/admiralci/.github/workflows/spellcheck.yml@main
if: github.event_name == 'pull_request'
needs: get_r_version
with:
r-version: "${{ needs.get_r_version.outputs.r-version }}"

# Bumps development version of the package
vbump:
name: Version Bump 🤜🤛
if: github.event_name == 'push'
uses: insightsengineering/r.pkg.template/.github/workflows/version-bump.yaml@main
secrets:
REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}

34 changes: 0 additions & 34 deletions .github/workflows/lint.yaml

This file was deleted.

48 changes: 0 additions & 48 deletions .github/workflows/pkgdown.yaml

This file was deleted.

63 changes: 0 additions & 63 deletions .github/workflows/spellcheck.yml

This file was deleted.

Loading

0 comments on commit 8ff1753

Please sign in to comment.