Skip to content

Closes #2920 add copilot instructions #5804

Closes #2920 add copilot instructions

Closes #2920 add copilot instructions #5804

Workflow file for this run

---
# Source: https://github.com/pharmaverse/admiralci
# Common workflows designed for Admiral
# but can be easily used by any other R package
name: admiral CI/CD Workflows
on:
# 'workflow_dispatch' gives you the ability
# to run this workflow on demand, anytime
workflow_dispatch:
# 'push' events are triggered when commits
# are pushed to one of these branches
push:
tags:
- "v*"
branches:
- main
# 'pull_request' events are triggered when PRs are created against one of
# these target branches or if commits are pushed to the source/feature branch.
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- main
# 'release' events are triggered when...
# you guessed it - when releases are made.
release:
types: [published]
# Docs on concurrency:
# https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
group: admiral-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
R_VERSION: "release"
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
style:
name: Code Style
uses: pharmaverse/admiralci/.github/workflows/style.yml@main
if: github.event_name == 'pull_request' && github.event.action != 'closed'
needs: get_r_version
with:
r-version: "${{ needs.get_r_version.outputs.r-version }}"
spellcheck:
name: Spelling
uses: pharmaverse/admiralci/.github/workflows/spellcheck.yml@main
if: github.event_name == 'pull_request' && github.event.action != 'closed'
needs: get_r_version
with:
r-version: "${{ needs.get_r_version.outputs.r-version }}"
validation:
name: Validation
uses: pharmaverse/admiralci/.github/workflows/r-pkg-validation.yml@main
if: github.event_name == 'release'
needs: get_r_version
with:
r-version: "${{ needs.get_r_version.outputs.r-version }}"
check:
name: Check
uses: pharmaverse/admiralci/.github/workflows/r-cmd-check.yml@main
with:
error-on: note # TODO: find a way to ignore specific notes
if: github.event_name == 'pull_request' && github.event.action != 'closed'
docs:
name: Documentation
uses: pharmaverse/admiralci/.github/workflows/pkgdown.yml@main
if: >
github.event_name == 'push' ||
startsWith(github.ref, 'refs/tags/v') ||
(github.event_name == 'pull_request' && contains(github.event.pull_request.title, '[create website]') &&
github.event.action != 'closed')
needs: get_r_version
with:
r-version: "release"
# Whether to skip multiversion docs
# Note that if you have multiple versions of docs,
# your URL links are likely to break due to path changes
skip-multiversion-docs: false
latest-tag-alt-name: cran-release
multiversion-docs-landing-page: cran-release
branches-or-tags-to-list: >-
^main$|^cran-release$|^v([0-9]+\\.)?([0-9]+\\.)?([0-9]+)
secrets:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
remove_docs:
name: Remove PR Website
uses: pharmaverse/admiralci/.github/workflows/remove_pr_website.yml@main
if: github.event_name == 'pull_request' && contains(github.event.pull_request.title, '[create website]')
secrets:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
linter:
name: Lint
uses: pharmaverse/admiralci/.github/workflows/lintr.yml@main
if: github.event_name == 'pull_request' && github.event.action != 'closed'
needs: get_r_version
with:
r-version: "${{ needs.get_r_version.outputs.r-version }}"
links:
name: Links
uses: pharmaverse/admiralci/.github/workflows/links.yml@main
if: >
github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
coverage:
name: Code Coverage
uses: pharmaverse/admiralci/.github/workflows/code-coverage.yml@main
if: >
github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
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: false
man-pages:
name: Man Pages
uses: pharmaverse/admiralci/.github/workflows/man-pages.yml@main
if: github.event_name == 'pull_request' && github.event.action != 'closed'
needs: get_r_version
with:
r-version: "${{ needs.get_r_version.outputs.r-version }}"
templates:
name: Check Templates
uses: pharmaverse/admiralci/.github/workflows/check-templates.yml@main
secrets: inherit
if: (github.event_name == 'pull_request' && github.event.action != 'closed') || github.event_name == 'workflow_dispatch'
needs: get_r_version
with:
r-version: "${{ needs.get_r_version.outputs.r-version }}"
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.PHARMAVERSE_BOT }}