Skip to content

Per #269, updated the messaging in 'xportr_order()` to fix a mistatem… #154

Per #269, updated the messaging in 'xportr_order()` to fix a mistatem…

Per #269, updated the messaging in 'xportr_order()` to fix a mistatem… #154

Workflow file for this run

---
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 }}