From 61e19673ecc92df27fe02bbc75dbd0df38fe65e0 Mon Sep 17 00:00:00 2001 From: Mohamed Yusuf Date: Fri, 1 Dec 2023 16:24:39 +0300 Subject: [PATCH 1/6] Create r.yml --- .github/workflows/r.yml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/r.yml diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml new file mode 100644 index 0000000..66f858e --- /dev/null +++ b/.github/workflows/r.yml @@ -0,0 +1,40 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. +# +# See https://github.com/r-lib/actions/tree/master/examples#readme for +# additional example workflows available for the R community. + +name: R + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +permissions: + contents: read + +jobs: + build: + runs-on: macos-latest + strategy: + matrix: + r-version: ['3.6.3', '4.1.1'] + + steps: + - uses: actions/checkout@v3 + - name: Set up R ${{ matrix.r-version }} + uses: r-lib/actions/setup-r@f57f1301a053485946083d7a45022b278929a78a + with: + r-version: ${{ matrix.r-version }} + - name: Install dependencies + run: | + install.packages(c("remotes", "rcmdcheck")) + remotes::install_deps(dependencies = TRUE) + shell: Rscript {0} + - name: Check + run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error") + shell: Rscript {0} From ce5fed3c8c06731d3c6488b3b088578c87b4a301 Mon Sep 17 00:00:00 2001 From: Mohamed Yusuf Date: Fri, 1 Dec 2023 16:34:33 +0300 Subject: [PATCH 2/6] Create codecov.yml --- .github/workflows/codecov.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/codecov.yml diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml new file mode 100644 index 0000000..cf51497 --- /dev/null +++ b/.github/workflows/codecov.yml @@ -0,0 +1,21 @@ +comment: false + +coverage: + range: 0..100 + round: up + precision: 0 + + status: + project: # measuring the overall project coverage + default: # context, you can create multiple ones with custom titles + enabled: yes # must be yes|true to enable this status + target: 90 # specify the target coverage for each commit status + # option: "auto" (must increase from parent commit or pull request base) + # option: "X%" a static target percentage to hit + threshold: null # allowed to drop X% and still result in a "success" commit status + + patch: + default: + enabled: yes # must be yes|true to enable this status + target: 0 + threshold: null From 6f6a1ab65b554262f5218eb9dd92913b12253a31 Mon Sep 17 00:00:00 2001 From: Mohamed Yusuf Date: Fri, 1 Dec 2023 16:35:44 +0300 Subject: [PATCH 3/6] Update and rename r.yml to R-CMD-check.yaml --- .github/workflows/R-CMD-check.yaml | 51 ++++++++++++++++++++++++++++++ .github/workflows/r.yml | 40 ----------------------- 2 files changed, 51 insertions(+), 40 deletions(-) create mode 100644 .github/workflows/R-CMD-check.yaml delete mode 100644 .github/workflows/r.yml diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml new file mode 100644 index 0000000..3f916d3 --- /dev/null +++ b/.github/workflows/R-CMD-check.yaml @@ -0,0 +1,51 @@ +# 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 +on: + push: + branches: [main, master] + pull_request: + branches: [main, master] + +name: R-CMD-check + +jobs: + R-CMD-check: + runs-on: ${{ matrix.config.os }} + + name: ${{ matrix.config.os }} (${{ matrix.config.r }}) + + strategy: + fail-fast: false + matrix: + config: + - {os: macos-latest, r: 'release'} + - {os: windows-latest, r: 'release'} + # - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} + - {os: ubuntu-latest, r: 'release'} + - {os: ubuntu-latest, r: 'oldrel-1'} + + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + _R_CHECK_CRAN_INCOMING_: false + # ACTIONS_STEP_DEBUG: ${{ secrets.ACTIONS_STEP_DEBUG }} + R_KEEP_PKG_SOURCE: yes + + steps: + - uses: actions/checkout@v3 + + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r@v2 + with: + r-version: ${{ matrix.config.r }} + http-user-agent: ${{ matrix.config.http-user-agent }} + 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 + with: + upload-snapshots: true diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml deleted file mode 100644 index 66f858e..0000000 --- a/.github/workflows/r.yml +++ /dev/null @@ -1,40 +0,0 @@ -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. -# -# See https://github.com/r-lib/actions/tree/master/examples#readme for -# additional example workflows available for the R community. - -name: R - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -permissions: - contents: read - -jobs: - build: - runs-on: macos-latest - strategy: - matrix: - r-version: ['3.6.3', '4.1.1'] - - steps: - - uses: actions/checkout@v3 - - name: Set up R ${{ matrix.r-version }} - uses: r-lib/actions/setup-r@f57f1301a053485946083d7a45022b278929a78a - with: - r-version: ${{ matrix.r-version }} - - name: Install dependencies - run: | - install.packages(c("remotes", "rcmdcheck")) - remotes::install_deps(dependencies = TRUE) - shell: Rscript {0} - - name: Check - run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error") - shell: Rscript {0} From 1b8a24d06cea8a16300e45c6a100124c12c231d2 Mon Sep 17 00:00:00 2001 From: Mohamed Yusuf Date: Fri, 1 Dec 2023 16:36:34 +0300 Subject: [PATCH 4/6] Create test-coverage.yml --- .github/workflows/test-coverage.yml | 31 +++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/test-coverage.yml diff --git a/.github/workflows/test-coverage.yml b/.github/workflows/test-coverage.yml new file mode 100644 index 0000000..4b65418 --- /dev/null +++ b/.github/workflows/test-coverage.yml @@ -0,0 +1,31 @@ +# 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 +on: + push: + branches: [main, master] + pull_request: + branches: [main, master] + +name: test-coverage + +jobs: + test-coverage: + runs-on: ubuntu-latest + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + + steps: + - uses: actions/checkout@v2 + + - uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::covr + needs: coverage + + - name: Test coverage + run: covr::codecov(quiet = FALSE) + shell: Rscript {0} From 9ecfda2180388cc83af2c13010c1b5457a99c987 Mon Sep 17 00:00:00 2001 From: Mohamed Yusuf Date: Fri, 1 Dec 2023 16:44:16 +0300 Subject: [PATCH 5/6] Update R-CMD-check.yaml --- .github/workflows/R-CMD-check.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 3f916d3..872f6a6 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -49,3 +49,7 @@ jobs: - uses: r-lib/actions/check-r-package@v2 with: upload-snapshots: true + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v3 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} From 3acaca1ce981c6b1da42cd9d0fb6cee79bbf404f Mon Sep 17 00:00:00 2001 From: Mohamed Yusuf Date: Fri, 1 Dec 2023 17:30:05 +0300 Subject: [PATCH 6/6] Delete .github/workflows/codecov.yml --- .github/workflows/codecov.yml | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 .github/workflows/codecov.yml diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml deleted file mode 100644 index cf51497..0000000 --- a/.github/workflows/codecov.yml +++ /dev/null @@ -1,21 +0,0 @@ -comment: false - -coverage: - range: 0..100 - round: up - precision: 0 - - status: - project: # measuring the overall project coverage - default: # context, you can create multiple ones with custom titles - enabled: yes # must be yes|true to enable this status - target: 90 # specify the target coverage for each commit status - # option: "auto" (must increase from parent commit or pull request base) - # option: "X%" a static target percentage to hit - threshold: null # allowed to drop X% and still result in a "success" commit status - - patch: - default: - enabled: yes # must be yes|true to enable this status - target: 0 - threshold: null