From d4ff5444f86fc4825f47eaf18f826262296947ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20Ramos=20P=C3=A9rez?= Date: Thu, 26 Mar 2026 15:51:59 +0000 Subject: [PATCH 1/2] Add ci.yml reusable-workflow wrapper --- .github/workflows/ci.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..2133e3b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,20 @@ +name: PR CMD check & build site + +on: + pull_request: + push: + paths: + - 'DESCRIPTION' + - '**.yml' + branches: + - devel + - 'RELEASE_*' + +jobs: + ci: + uses: waldronlab/.github/.github/workflows/bioc-pr-cmdcheck-pkgdown.yml@devel + secrets: inherit + permissions: + contents: write + pages: write + id-token: write From f941578a2e45b9d82e08181a368e40a9787496a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20Ramos=20P=C3=A9rez?= Date: Thu, 26 Mar 2026 15:52:00 +0000 Subject: [PATCH 2/2] Remove pr_check.yml (replaced by ci.yml) --- .github/workflows/pr_check.yml | 174 --------------------------------- 1 file changed, 174 deletions(-) delete mode 100644 .github/workflows/pr_check.yml diff --git a/.github/workflows/pr_check.yml b/.github/workflows/pr_check.yml deleted file mode 100644 index 637308d..0000000 --- a/.github/workflows/pr_check.yml +++ /dev/null @@ -1,174 +0,0 @@ -name: PR CMD check & build site - -on: - pull_request: - push: - paths: - - 'DESCRIPTION' - - '**.yml' - branches: - - devel - -env: - R_REMOTES_NO_ERRORS_FROM_WARNINGS: true - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - CRAN: https://p3m.dev/cran/__linux__/noble/latest - BIOC_VERSION: devel - -jobs: - set-matrix: - runs-on: ubuntu-24.04 - outputs: - matrix: ${{ steps.set.outputs.matrix }} - dockerfile_exists: ${{ steps.dockerfile.outputs.exists }} - steps: - - name: Set Matrix Bioconductor Version - id: set - run: | - MATRIX="{\"include\":[{\"bioc_version\":\"$GITHUB_REF_NAME\"}]}" - echo "matrix=$MATRIX" >> $GITHUB_OUTPUT - - name: Check for Dockerfile - id: dockerfile - run: | - echo "exists=$( [ -f ./inst/docker/pkg/Dockerfile ] && echo true || echo false )" >> $GITHUB_OUTPUT - - check: - needs: set-matrix - runs-on: ubuntu-latest - strategy: - matrix: ${{ fromJson(needs.set-matrix.outputs.matrix) }} - container: bioconductor/bioconductor_docker:${{ matrix.bioc_version }} - - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - with: - ref: ${{ matrix.bioc_version }} - - - name: Query dependencies - run: | - BiocManager::install(c("covr", "remotes", "BiocCheck", "waldronlab/imageTCGAutils")) - saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) - shell: Rscript {0} - - - name: Install R Package - run: | - remotes::install_local(repos = BiocManager::repositories()) - shell: Rscript {0} - - - name: Cache R packages - uses: actions/cache@v4 - with: - path: /usr/local/lib/R/site-library - key: ${{ runner.os }}-r-${{ matrix.bioc_version }}-${{ hashFiles('.github/depends.Rds') }} - restore-keys: ${{ runner.os }}-r-${{ matrix.bioc_version }}- - - - name: Install GPG - if: ${{ github.ref == 'refs/heads/devel' && github.event_name != 'pull_request' }} - run: sudo apt-get update && sudo apt-get install -y gpg - - - name: Install Dependencies - run: | - BiocManager::install("waldronlab/HistoImagePlot", ask = FALSE, update = TRUE) - remotes::install_deps(dependencies = TRUE, repos = BiocManager::repositories()) - shell: Rscript {0} - - - name: Check Package - env: - _R_CHECK_CRAN_INCOMING_REMOTE_: false - run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error", check_dir = "check") - shell: Rscript {0} - - - name: Test coverage - if: ${{ success() && github.ref == 'refs/heads/devel' && github.event_name != 'pull_request' }} - run: | - cov <- covr::package_coverage( - quiet = FALSE, - clean = FALSE, - type = "all", - install_path = file.path( - normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), - "package" - ) - ) - covr::to_cobertura(cov) - shell: Rscript {0} - - - name: Upload test results to Codecov - if: ${{ success() && github.ref == 'refs/heads/devel' && github.event_name != 'pull_request' }} - uses: codecov/codecov-action@v4 - with: - fail_ci_if_error: ${{ github.event_name != 'pull_request' && true || false }} - file: ./cobertura.xml - plugin: noop - disable_search: true - token: ${{ secrets.CODECOV_TOKEN }} - - - name: Run BiocCheck - id: bioccheck - run: | - BiocCheck::BiocCheck( - dir('check', 'tar.gz$', full.names = TRUE), - `quit-with-status` = TRUE, `no-check-bioc-help` = TRUE - ) - shell: Rscript {0} - - - name: Build pkgdown - if: ${{ github.ref == format('refs/heads/{0}', env.BIOC_VERSION) && github.event_name != 'pull_request' }} - run: | - PATH=$PATH:$HOME/bin/ Rscript -e 'pkgdown::build_site()' - - - name: Upload pkgdown artifact - if: github.ref == format('refs/heads/{0}', env.BIOC_VERSION) - uses: actions/upload-pages-artifact@v3 - with: - path: docs - - dock: - needs: - - check - - set-matrix - runs-on: ubuntu-24.04 - if: ${{ github.ref == 'refs/heads/devel' && needs.set-matrix.outputs.dockerfile_exists == 'true' }} - steps: - - name: Checkout Repository - if: ${{ success() && github.event_name != 'pull_request' }} - uses: actions/checkout@v4 - - - name: Register repo name - if: ${{ github.event_name != 'pull_request' }} - id: reg_repo_name - run: | - echo CONT_IMG_NAME=$(echo ${{ github.event.repository.name }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV - - - name: Login to Docker Hub - if: ${{ github.event_name != 'pull_request' }} - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and Push Docker - if: ${{ success() && github.event_name != 'pull_request' }} - uses: docker/build-push-action@v6 - with: - context: . - file: ./inst/docker/pkg/Dockerfile - push: true - tags: > - ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.CONT_IMG_NAME }}:latest, - ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.CONT_IMG_NAME }}:devel - - deploy: - needs: check - permissions: - contents: write - pages: write - id-token: write - runs-on: ubuntu-24.04 - - steps: - - name: Deploy to GitHub Pages - if: ${{ github.ref == format('refs/heads/{0}', env.BIOC_VERSION) && github.event_name != 'pull_request' }} - id: deployment - uses: actions/deploy-pages@v4