diff --git a/.github/workflows/R-CMD-check.yml b/.github/workflows/R-CMD-check.yml new file mode 100644 index 0000000..6d668d7 --- /dev/null +++ b/.github/workflows/R-CMD-check.yml @@ -0,0 +1,32 @@ +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +name: R-CMD-check + +on: + pull_request: + branches: + - "*" + push: + branches: + - "master" + - "*" + +jobs: + R-CMD-check: + runs-on: ubuntu-latest + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + R_KEEP_PKG_SOURCE: yes + steps: + - uses: actions/checkout@v3 + + - uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::rcmdcheck + needs: check + + - uses: r-lib/actions/check-r-package@v2 \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 2e3a59e..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,92 +0,0 @@ -name: R - -on: - pull_request: - branches: - - "*" - push: - branches: - - "master" - - "*" - -env: - cache-version: "cache-v1" - -jobs: - build: - strategy: - max-parallel: 5 - matrix: - config: - - { r-version: release, os: ubuntu-latest } - - { r-version: release, os: macos-latest } - runs-on: ${{ matrix.config.os }} - env: - R_REMOTES_NO_ERRORS_FROM_WARNINGS: true - NOT_CRAN: true - TZ: UTC - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - - - name: Install ubuntu system dependencies - if: matrix.config.os == 'ubuntu-latest' - run: | - sudo apt-get install git libcurl4-openssl-dev libssl-dev libicu-dev libxml2-dev make pandoc libgit2-dev libharfbuzz-dev libfribidi-dev libglpk-dev - - name: Install macOS system dependencies - if: matrix.config.os == 'macos-latest' - run: | - brew install cairo pkg-config autoconf automake libtool - - - name: Set up R - uses: r-lib/actions/setup-r@v2 - with: - r-version: ${{ matrix.config.r-version}} - - - name: Setup r-lib/remotes - run: | - install.packages(c("remotes", "devtools")) - shell: Rscript {0} - - - id: bioc - name: Check bioc version - run: | - echo "##[set-output name=mainbiocversion;]$(Rscript -e 'cat(unlist(tools:::.BioC_version_associated_with_R_version()))' | awk '{print $1}')" - echo "##[set-output name=subbiocversion;]$(Rscript -e 'cat(unlist(tools:::.BioC_version_associated_with_R_version()))' | awk '{print $2}')" - echo "##[set-output name=biocversion;]$(Rscript -e 'cat(as.character(tools:::.BioC_version_associated_with_R_version()))' | awk '{print $1}')" - shell: bash -l {0} - - - name: Cache ubuntu R packages - if: "!contains(github.event.head_commit.message, '/nocache') && matrix.config.os == 'ubuntu-latest'" - uses: actions/cache@v2 - with: - path: /home/runner/work/_temp/Library - key: ${{ env.cache-version }}-${{ matrix.config.os }}-biocversion-RELEASE_${{ steps.bioc.outputs.mainbiocversion}}_${{ steps.bioc.outputs.subbiocversion}}-r-${{ matrix.config.r-version}}-${{ hashFiles('.github/depends.Rds') }} - restore-keys: ${{ env.cache-version }}-${{ matrix.config.os }}-biocversion-RELEASE_${{ steps.bioc.outputs.mainbiocversion}}_${{ steps.bioc.outputs.subbiocversion}}-r-${{ matrix.config.r-version}}- - - - name: Cache macOS R packages - if: "!contains(github.event.head_commit.message, '/nocache') && matrix.config.os != 'ubuntu-latest'" - uses: actions/cache@v2 - with: - path: ${{ env.R_LIBS_USER }} - key: ${{ env.cache-version }}-${{ matrix.config.os }}-biocversion-RELEASE_${{ steps.bioc.outputs.mainbiocversion}}_${{ steps.bioc.outputs.subbiocversion}}-r-${{ matrix.config.r-version}}-${{ hashFiles('.github/depends.Rds') }} - restore-keys: ${{ env.cache-version }}-${{ matrix.config.os }}-biocversion-RELEASE_${{ steps.bioc.outputs.mainbiocversion}}_${{ steps.bioc.outputs.subbiocversion}}-r-${{ matrix.config.r-version}}- - - - name: Install dependencies - run: | - install.packages(c("rcmdcheck", "covr")) - remotes::install_deps(dependencies = TRUE) - shell: Rscript {0} - - - name: Check - run: | - Rscript -e 'rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error")' - shell: bash -l {0} - - - name: Test coverage - run: | - Rscript -e 'covr::codecov(token = "${{ secrets.CODECOV_TOKEN }}")' - shell: bash -l {0}