From 0cdcd7e0d28e43f7ce1c89dac13cece5960b389e Mon Sep 17 00:00:00 2001 From: cicdguy <26552821+cicdguy@users.noreply.github.com> Date: Fri, 27 Oct 2023 09:40:21 -0500 Subject: [PATCH 1/4] Test no R version --- .github/workflows/common.yml | 57 ++++++++++++++++++++++++------------ 1 file changed, 39 insertions(+), 18 deletions(-) diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml index 01a35f6c13..525159c27b 100644 --- a/.github/workflows/common.yml +++ b/.github/workflows/common.yml @@ -33,43 +33,61 @@ concurrency: group: admiral-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true +env: + R_VERSION: "4.1" + 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 + uses: pharmaverse/admiralci/.github/workflows/style.yml@no-get-r-version-job if: github.event_name == 'pull_request' + needs: get_r_version with: - r-version: "4.1" + r-version: "${{ needs.get_r_version.outputs.r-version }}" spellcheck: name: Spelling - uses: pharmaverse/admiralci/.github/workflows/spellcheck.yml@main + uses: pharmaverse/admiralci/.github/workflows/spellcheck.yml@no-get-r-version-job if: github.event_name == 'pull_request' + needs: get_r_version with: - r-version: "4.1" + r-version: "${{ needs.get_r_version.outputs.r-version }}" readme: name: Render README - uses: pharmaverse/admiralci/.github/workflows/readme-render.yml@main + uses: pharmaverse/admiralci/.github/workflows/readme-render.yml@no-get-r-version-job if: github.event_name == 'push' + needs: get_r_version with: - r-version: "4.1" + r-version: "${{ needs.get_r_version.outputs.r-version }}" validation: name: Validation - uses: pharmaverse/admiralci/.github/workflows/r-pkg-validation.yml@main + uses: pharmaverse/admiralci/.github/workflows/r-pkg-validation.yml@no-get-r-version-job if: github.event_name == 'release' + needs: get_r_version with: - r-version: "4.1" + r-version: "${{ needs.get_r_version.outputs.r-version }}" check: name: Check - uses: pharmaverse/admiralci/.github/workflows/r-cmd-check.yml@main + uses: pharmaverse/admiralci/.github/workflows/r-cmd-check.yml@no-get-r-version-job with: error-on: warning # TODO: find a way to ignore specific notes if: github.event_name == 'pull_request' docs: name: Documentation - uses: pharmaverse/admiralci/.github/workflows/pkgdown.yml@main + uses: pharmaverse/admiralci/.github/workflows/pkgdown.yml@no-get-r-version-job if: github.event_name == 'push' || startsWith(github.ref, 'refs/tags/v') + needs: get_r_version with: - r-version: "4.1" + r-version: "${{ needs.get_r_version.outputs.r-version }}" # 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 @@ -80,28 +98,31 @@ jobs: ^cran-release$|^v([0-9]+\\.)?([0-9]+\\.)?([0-9]+)$ linter: name: Lint - uses: pharmaverse/admiralci/.github/workflows/lintr.yml@main + uses: pharmaverse/admiralci/.github/workflows/lintr.yml@no-get-r-version-job + needs: get_r_version if: github.event_name == 'pull_request' with: - r-version: "4.1" + r-version: "${{ needs.get_r_version.outputs.r-version }}" links: name: Links - uses: pharmaverse/admiralci/.github/workflows/links.yml@main + uses: pharmaverse/admiralci/.github/workflows/links.yml@no-get-r-version-job if: github.event_name == 'pull_request' coverage: name: Code Coverage - uses: pharmaverse/admiralci/.github/workflows/code-coverage.yml@main + uses: pharmaverse/admiralci/.github/workflows/code-coverage.yml@no-get-r-version-job if: > github.event_name != 'release' + needs: get_r_version with: - r-version: "4.1" + 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 + uses: pharmaverse/admiralci/.github/workflows/man-pages.yml@no-get-r-version-job if: github.event_name == 'pull_request' + needs: get_r_version with: - r-version: "4.1" + r-version: "${{ needs.get_r_version.outputs.r-version }}" From 7232d3f640a6812d6ddb3840759efd52edf64745 Mon Sep 17 00:00:00 2001 From: cicdguy <26552821+cicdguy@users.noreply.github.com> Date: Fri, 27 Oct 2023 09:46:25 -0500 Subject: [PATCH 2/4] Consolidate check templates into common pipeline --- .github/workflows/common.yml | 9 +++++++++ .github/workflows/templates.yml | 17 ----------------- 2 files changed, 9 insertions(+), 17 deletions(-) delete mode 100644 .github/workflows/templates.yml diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml index 525159c27b..b6178c4958 100644 --- a/.github/workflows/common.yml +++ b/.github/workflows/common.yml @@ -126,3 +126,12 @@ jobs: 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@no-get-r-version-job + secrets: inherit + if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' + needs: get_r_version + with: + r-version: "${{ needs.get_r_version.outputs.r-version }}" + push-templates-data: true diff --git a/.github/workflows/templates.yml b/.github/workflows/templates.yml deleted file mode 100644 index dc72a4d3ad..0000000000 --- a/.github/workflows/templates.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Check Templates - -on: - workflow_dispatch: - pull_request: - branches: - - main - - devel - -jobs: - templates: - name: Check Templates - uses: pharmaverse/admiralci/.github/workflows/check-templates.yml@main - secrets: inherit - with: - r-version: "4.1" - push-templates-data: true \ No newline at end of file From 28d389910ef411b68e0409b543b5a4b009c2a043 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daphn=C3=A9=20Grasselly?= <56442075+dgrassellyb@users.noreply.github.com> Date: Tue, 7 Nov 2023 09:46:22 +0100 Subject: [PATCH 3/4] change admiralci ref --- .github/workflows/common.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml index d09348bf67..2b58dca8a6 100644 --- a/.github/workflows/common.yml +++ b/.github/workflows/common.yml @@ -49,41 +49,41 @@ jobs: shell: bash style: name: Code Style - uses: pharmaverse/admiralci/.github/workflows/style.yml@no-get-r-version-job + 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 }}" spellcheck: name: Spelling - uses: pharmaverse/admiralci/.github/workflows/spellcheck.yml@no-get-r-version-job + 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 }}" readme: name: Render README - uses: pharmaverse/admiralci/.github/workflows/readme-render.yml@no-get-r-version-job + uses: pharmaverse/admiralci/.github/workflows/readme-render.yml@main if: github.event_name == 'push' 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@no-get-r-version-job + 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@no-get-r-version-job + uses: pharmaverse/admiralci/.github/workflows/r-cmd-check.yml@main with: error-on: warning # TODO: find a way to ignore specific notes if: github.event_name == 'pull_request' docs: name: Documentation - uses: pharmaverse/admiralci/.github/workflows/pkgdown.yml@no-get-r-version-job + uses: pharmaverse/admiralci/.github/workflows/pkgdown.yml@main if: github.event_name == 'push' || startsWith(github.ref, 'refs/tags/v') needs: get_r_version with: @@ -93,18 +93,18 @@ jobs: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} linter: name: Lint - uses: pharmaverse/admiralci/.github/workflows/lintr.yml@no-get-r-version-job + uses: pharmaverse/admiralci/.github/workflows/lintr.yml@main needs: get_r_version if: github.event_name == 'pull_request' with: r-version: "${{ needs.get_r_version.outputs.r-version }}" links: name: Links - uses: pharmaverse/admiralci/.github/workflows/links.yml@no-get-r-version-job + uses: pharmaverse/admiralci/.github/workflows/links.yml@main if: github.event_name == 'pull_request' coverage: name: Code Coverage - uses: pharmaverse/admiralci/.github/workflows/code-coverage.yml@no-get-r-version-job + uses: pharmaverse/admiralci/.github/workflows/code-coverage.yml@main if: > github.event_name != 'release' needs: get_r_version @@ -116,14 +116,14 @@ jobs: skip-coverage-badges: false man-pages: name: Man Pages - uses: pharmaverse/admiralci/.github/workflows/man-pages.yml@no-get-r-version-job + uses: pharmaverse/admiralci/.github/workflows/man-pages.yml@main if: github.event_name == 'pull_request' 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@no-get-r-version-job + uses: pharmaverse/admiralci/.github/workflows/check-templates.yml@main secrets: inherit if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' needs: get_r_version From b18b7344bbed24be2a1e04d870a4c82b441fe49c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daphn=C3=A9=20Grasselly?= <56442075+dgrassellyb@users.noreply.github.com> Date: Tue, 7 Nov 2023 10:05:44 +0100 Subject: [PATCH 4/4] remove pharmaverseadam push --- .github/workflows/common.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml index 2b58dca8a6..183e6b1037 100644 --- a/.github/workflows/common.yml +++ b/.github/workflows/common.yml @@ -129,4 +129,4 @@ jobs: needs: get_r_version with: r-version: "${{ needs.get_r_version.outputs.r-version }}" - push-templates-data: true + push-templates-data: false