From fc8ac20d3979463818e3e02352913da566054793 Mon Sep 17 00:00:00 2001 From: Edoardo Mancini Date: Mon, 10 Jun 2024 08:37:18 +0000 Subject: [PATCH 1/2] #235 added vbump --- .github/workflows/common.yml | 138 +++++++++++++++++++++++++++++++++++ 1 file changed, 138 insertions(+) diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml index fd26885..619b70a 100644 --- a/.github/workflows/common.yml +++ b/.github/workflows/common.yml @@ -131,3 +131,141 @@ jobs: needs: get_r_version with: r-version: "${{ needs.get_r_version.outputs.r-version }}" +--- +# Source: https://github.com/pharmaverse/admiralci +# Common workflows designed for Admiral +# but can be easily used by any other R package +name: Admiral 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: + branches: + - main + - pre-release + - test + # 'pull_request' events are triggered when PRs are + # created against one of these target branches. + pull_request: + branches: + - main + - pre-release + - test + # '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: "4.2" + +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' + 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' + 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@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@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 + if: github.event_name == 'pull_request' + with: + error-on: warning # TODO: find a way to ignore specific notes + docs: + name: Documentation + uses: pharmaverse/admiralci/.github/workflows/pkgdown.yml@main + if: github.event_name == 'push' + needs: get_r_version + with: + 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 + skip-multiversion-docs: true + 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 }}" + links: + name: Links + uses: pharmaverse/admiralci/.github/workflows/links.yml@main + if: > + github.event_name == 'push' || github.event_name == 'pull_request' + coverage: + name: Code Coverage + uses: pharmaverse/admiralci/.github/workflows/code-coverage.yml@main + if: > + github.event_name == 'push' || github.event_name == 'pull_request' + 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 + templates: + name: Check Templates + uses: pharmaverse/admiralci/.github/workflows/check-templates.yml@main + if: > + github.event_name == 'push' || github.event_name == 'pull_request' + needs: get_r_version + with: + r-version: "${{ needs.get_r_version.outputs.r-version }}" + man-pages: + name: Man Pages + 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 }}" + vbump: + name: Version Bump + if: github.event_name == 'push' + uses: insightsengineering/r.pkg.template/.github/workflows/version-bump.yaml@main + secrets: From 8df9203b4b8d9934e514fb64d5ad19d15abb4587 Mon Sep 17 00:00:00 2001 From: Edoardo Mancini Date: Mon, 10 Jun 2024 08:55:19 +0000 Subject: [PATCH 2/2] #235 corrected typo --- .github/workflows/common.yml | 133 ----------------------------------- 1 file changed, 133 deletions(-) diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml index 619b70a..eb2dc6d 100644 --- a/.github/workflows/common.yml +++ b/.github/workflows/common.yml @@ -36,139 +36,6 @@ concurrency: env: R_VERSION: "4.2" -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' - 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' - 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@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@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 - if: github.event_name == 'pull_request' - with: - error-on: warning # TODO: find a way to ignore specific notes - docs: - name: Documentation - uses: pharmaverse/admiralci/.github/workflows/pkgdown.yml@main - if: github.event_name == 'push' - needs: get_r_version - with: - 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 - skip-multiversion-docs: true - 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 }}" - links: - name: Links - uses: pharmaverse/admiralci/.github/workflows/links.yml@main - if: > - github.event_name == 'push' || github.event_name == 'pull_request' - coverage: - name: Code Coverage - uses: pharmaverse/admiralci/.github/workflows/code-coverage.yml@main - if: > - github.event_name == 'push' || github.event_name == 'pull_request' - 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 - templates: - name: Check Templates - uses: pharmaverse/admiralci/.github/workflows/check-templates.yml@main - if: > - github.event_name == 'push' || github.event_name == 'pull_request' - needs: get_r_version - with: - r-version: "${{ needs.get_r_version.outputs.r-version }}" - man-pages: - name: Man Pages - 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 }}" ---- -# Source: https://github.com/pharmaverse/admiralci -# Common workflows designed for Admiral -# but can be easily used by any other R package -name: Admiral 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: - branches: - - main - - pre-release - - test - # 'pull_request' events are triggered when PRs are - # created against one of these target branches. - pull_request: - branches: - - main - - pre-release - - test - # '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: "4.2" - jobs: get_r_version: name: Get R version