Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No R version get for all jobs #160

Merged
merged 4 commits into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 21 additions & 33 deletions .github/workflows/check-templates.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
on:
workflow_dispatch:
inputs:
r-version:
description: 'The version of R to use'
default: '4.1'
required: false
type: choice
options:
- '4.1'
- '4.2'
- '4.3'
push-templates-data:
description: 'Push generated templates data to pharmaverseadam repo'
default: false
required: false
type: boolean
exclude-templates-data:
description: 'List of data generated by templates to exclude (templates script will run, but results will not be push to pharmaverseadam repo) - comma seperated list'
default: ''
required: false
type: string
workflow_call:
inputs:
r-version:
Expand All @@ -17,16 +37,6 @@ on:
default: ''
required: false
type: string
push:
branches:
- main
- devel
- pre-release
pull_request:
branches:
- main
- devel
- pre-release

env:
# branch name for PR
Expand Down Expand Up @@ -58,35 +68,13 @@ concurrency:
cancel-in-progress: true

jobs:
get_r_version:
name: Get R version
runs-on: ubuntu-latest
if: >
!contains(github.event.commits[0].message, '[skip check_templates]')
outputs:
r-version: ${{ steps.normalizer.outputs.R_VERSION }}
steps:
- name: Normalize inputs
id: normalizer
run: |
R_VERSION="${{ inputs.r-version }}"
if [ "$R_VERSION" == "" ]
then {
R_VERSION="4.1"
}
fi
echo "R_VERSION=$R_VERSION" >> $GITHUB_OUTPUT
shell: bash

check_templates:
name: Verify
if: >
!contains(github.event.commits[0].message, '[skip check_templates]')
runs-on: ubuntu-latest
container:
image: "ghcr.io/pharmaverse/admiralci-${{needs.get_r_version.outputs.r-version}}:latest"
needs: get_r_version

image: "ghcr.io/pharmaverse/admiralci-${{ inputs.r-version }}:latest"
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
Expand Down
47 changes: 16 additions & 31 deletions .github/workflows/code-coverage.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
on:
workflow_dispatch:
inputs:
r-version:
description: 'The version of R to use'
default: '4.1'
required: false
type: choice
options:
- '4.1'
- '4.2'
- '4.3'
skip-coverage-badges:
description: 'Skip code coverage badge creation'
default: false
required: false
type: boolean
workflow_call:
inputs:
r-version:
Expand All @@ -12,16 +27,6 @@ on:
default: false
required: false
type: boolean
push:
branches:
- main
- devel
- pre-release
pull_request:
branches:
- main
- devel
- pre-release

name: Code Coverage

Expand All @@ -30,37 +35,17 @@ concurrency:
cancel-in-progress: true

jobs:
get_r_version:
name: Get R version
runs-on: ubuntu-latest
if: >
!contains(github.event.commits[0].message, '[skip coverage]')
outputs:
r-version: ${{ steps.normalizer.outputs.R_VERSION }}
steps:
- name: Normalize inputs
id: normalizer
run: |
R_VERSION="${{ inputs.r-version }}"
if [ "$R_VERSION" == "" ]
then {
R_VERSION="4.1"
}
fi
echo "R_VERSION=$R_VERSION" >> $GITHUB_OUTPUT
shell: bash
coverage:
name: Test Coverage
runs-on: ubuntu-latest
container:
image: "ghcr.io/pharmaverse/admiralci-${{needs.get_r_version.outputs.r-version}}:latest"
image: "ghcr.io/pharmaverse/admiralci-${{ inputs.r-version }}:latest"
if: >
!contains(github.event.commits[0].message, '[skip coverage]')
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
outputs:
coverage-percent: ${{ steps.set-coverage-percentage.outputs.coverage-percentage }}
needs: get_r_version
steps:
##################### BEGIN boilerplate steps #####################
- name: Get branch names
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/cran-status.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,32 @@ name: CRAN Status

on:
workflow_dispatch:
inputs:
issue-assignees:
description: |
Whom should the issue be assigned to if errors are
encountered in the CRAN status checks?
This is a comma-separated string of GitHub usernames.
If undefined or empty, no assignments are made.
default: ''
required: false
type: string
statuses:
description: |
Create an issue if one or more of the following
statuses are reported on the check report.
This is a comma-separated string of statuses.
Allowed statuses are 'NOTE', 'WARN', and 'ERROR'
default: 'ERROR'
required: false
type: string
path:
description: |
Path to the R package root, if the package is not at the
top level of the repository.
default: '.'
required: false
type: string
workflow_call:
inputs:
issue-assignees:
Expand Down
47 changes: 16 additions & 31 deletions .github/workflows/lintr.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
on:
workflow_dispatch:
inputs:
r-version:
description: 'The version of R to use'
default: '4.1'
required: false
type: choice
options:
- '4.1'
- '4.2'
- '4.3'
lint-all-files:
description: 'Lint all files every time'
default: 'false'
required: false
type: string
workflow_call:
inputs:
r-version:
Expand All @@ -12,16 +27,6 @@ on:
default: 'false'
required: false
type: string
push:
branches:
- main
- devel
- pre-release
pull_request:
branches:
- main
- devel
- pre-release

name: Lint

Expand All @@ -30,35 +35,15 @@ concurrency:
cancel-in-progress: true

jobs:
get_r_version:
name: Get R version
runs-on: ubuntu-latest
if: >
!contains(github.event.commits[0].message, '[skip lint]')
outputs:
r-version: ${{ steps.normalizer.outputs.R_VERSION }}
steps:
- name: Normalize inputs
id: normalizer
run: |
R_VERSION="${{ inputs.r-version }}"
if [ "$R_VERSION" == "" ]
then {
R_VERSION="4.1"
}
fi
echo "R_VERSION=$R_VERSION" >> $GITHUB_OUTPUT
shell: bash
lint:
name: Lint
runs-on: ubuntu-latest
container:
image: "ghcr.io/pharmaverse/admiralci-${{needs.get_r_version.outputs.r-version}}:latest"
image: "ghcr.io/pharmaverse/admiralci-${{ inputs.r-version }}:latest"
if: >
!contains(github.event.commits[0].message, '[skip lint]')
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
needs: get_r_version
steps:
##################### BEGIN boilerplate steps #####################
- name: Get branch names
Expand Down
42 changes: 11 additions & 31 deletions .github/workflows/man-pages.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
on:
workflow_dispatch:
inputs:
r-version:
description: 'The version of R to use'
default: '4.1'
required: false
type: choice
options:
- '4.1'
- '4.2'
- '4.3'
workflow_call:
inputs:
r-version:
description: 'The version of R to use'
default: '4.1'
required: false
type: string
push:
branches:
- main
- devel
- pre-release
pull_request:
branches:
- main
- devel
- pre-release

name: Man Pages

Expand All @@ -25,35 +25,15 @@ concurrency:
cancel-in-progress: true

jobs:
get_r_version:
name: Get R version
runs-on: ubuntu-latest
if: >
!contains(github.event.commits[0].message, '[skip lint]')
outputs:
r-version: ${{ steps.normalizer.outputs.R_VERSION }}
steps:
- name: Normalize inputs
id: normalizer
run: |
R_VERSION="${{ inputs.r-version }}"
if [ "$R_VERSION" == "" ]
then {
R_VERSION="4.1"
}
fi
echo "R_VERSION=$R_VERSION" >> $GITHUB_OUTPUT
shell: bash
lint:
name: Roxygen
runs-on: ubuntu-latest
container:
image: "ghcr.io/pharmaverse/admiralci-${{needs.get_r_version.outputs.r-version}}:latest"
image: "ghcr.io/pharmaverse/admiralci-${{ inputs.r-version }}:latest"
if: >
!contains(github.event.commits[0].message, '[skip lint]')
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
needs: get_r_version
steps:
##################### BEGIN boilerplate steps #####################
- name: Get branch names
Expand Down
Loading