Skip to content

Commit

Permalink
Remove covr hack from unit tests and re-run all actions on Linux only
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonysena committed Sep 19, 2023
1 parent f4a612a commit b9813d3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 20 deletions.
30 changes: 12 additions & 18 deletions .github/workflows/R_CMD_check_Hades.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@ jobs:
r-version: ${{ matrix.config.r }}
rtools-version: ${{ matrix.config.rtools }}

# - uses: r-lib/actions/setup-renv@v2
# with:
# bypass-cache: true

- uses: r-lib/actions/setup-tinytex@v2

- uses: r-lib/actions/setup-pandoc@v2
Expand All @@ -89,28 +85,26 @@ jobs:
extra-packages: any::rcmdcheck
needs: check

# - uses: r-lib/actions/check-r-package@v2
# with:
# args: 'c("--no-manual", "--as-cran")'
# error-on: '"warning"'
# check-dir: '"check"'
#
# - name: Upload source package
# if: success() && runner.os == 'Windows' && github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
# uses: actions/upload-artifact@v2
# with:
# name: package_tarball
# path: check/*.tar.gz
- uses: r-lib/actions/check-r-package@v2
with:
args: 'c("--no-manual", "--as-cran")'
error-on: '"warning"'
check-dir: '"check"'

- name: Upload source package
if: success() && runner.os == 'Windows' && github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v2
with:
name: package_tarball
path: check/*.tar.gz

- name: Install covr
#if: runner.os == 'Windows'
if: runner.os == 'Linux'
run: |
install.packages("covr")
shell: Rscript {0}

- name: Test coverage
#if: runner.os == 'Windows'
if: runner.os == 'Linux'
run: covr::codecov()
shell: Rscript {0}
Expand Down
3 changes: 1 addition & 2 deletions tests/testthat/test-Strategus.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ test_that("Run unit test study", {
resultsDatabaseSchema <- NULL

# Only run this code if we're testing on SQLite
# AND we're not running code coverage checks
if (dbms == "sqlite" && !identical(tolower(Sys.getenv("R_COVR")), "true")) {
if (dbms == "sqlite") {
resultsConnectionDetailsReference <- "result-store"
resultsDatabaseSchema <- "main"
Strategus::storeConnectionDetails(
Expand Down

0 comments on commit b9813d3

Please sign in to comment.