Skip to content

Commit

Permalink
Add CODECOV_TOKEN and add all revdep files
Browse files Browse the repository at this point in the history
  • Loading branch information
rstub committed Apr 7, 2024
1 parent d8d641d commit b5dd82f
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 16 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/revdepcheck.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,14 @@ jobs:

# Commit all changed files back to the repository
- uses: stefanzweifel/git-auto-commit-action@v5
with:
# Optional glob pattern of files which should be added to the commit
# Defaults to all (.)
# See the `pathspec`-documentation for git
# - https://git-scm.com/docs/git-add#Documentation/git-add.txt-ltpathspecgt82308203
# - https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefpathspecapathspec
file_pattern: 'revdep'

# Optional. Options used by `git-add`.
# See https://git-scm.com/docs/git-add#_options
add_options: '--all'
7 changes: 4 additions & 3 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

steps:
- uses: actions/checkout@v4
Expand All @@ -31,20 +32,20 @@ jobs:
covr::codecov(
quiet = FALSE,
clean = FALSE,
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
)
shell: Rscript {0}

- name: Show testthat output
if: always()
run: |
## --------------------------------------------------------------------
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload test results
if: failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ knitr::opts_chunk$set(

[![R build status](https://github.com/daqana/dqrng/workflows/R-CMD-check/badge.svg)](https://github.com/daqana/dqrng/actions)
[![CRAN status](https://www.r-pkg.org/badges/version/dqrng)](https://cran.r-project.org/package=dqrng)
[![Coverage status](https://codecov.io/gh/daqana/dqrng/branch/master/graph/badge.svg)](https://app.codecov.io/github/daqana/dqrng?branch=master)
[![Coverage status](https://codecov.io/gh/daqana/dqrng/branch/main/graph/badge.svg)](https://app.codecov.io/github/daqana/dqrng?branch=main)
[![Downloads](https://cranlogs.r-pkg.org/badges/dqrng?color=brightgreen)](https://www.r-pkg.org/pkg/dqrng)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/2157/badge)](https://bestpractices.coreinfrastructure.org/projects/2157)
[![Dependencies](https://tinyverse.netlify.com/badge/dqrng)](https://cran.r-project.org/package=dqrng)
Expand Down
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ status](https://github.com/daqana/dqrng/workflows/R-CMD-check/badge.svg)](https:
[![CRAN
status](https://www.r-pkg.org/badges/version/dqrng)](https://cran.r-project.org/package=dqrng)
[![Coverage
status](https://codecov.io/gh/daqana/dqrng/branch/master/graph/badge.svg)](https://app.codecov.io/github/daqana/dqrng?branch=master)
status](https://codecov.io/gh/daqana/dqrng/branch/main/graph/badge.svg)](https://app.codecov.io/github/daqana/dqrng?branch=main)
[![Downloads](https://cranlogs.r-pkg.org/badges/dqrng?color=brightgreen)](https://www.r-pkg.org/pkg/dqrng)
[![CII Best
Practices](https://bestpractices.coreinfrastructure.org/projects/2157/badge)](https://bestpractices.coreinfrastructure.org/projects/2157)
Expand Down Expand Up @@ -61,8 +61,8 @@ bm[, 1:4]
#> # A tibble: 2 × 4
#> expression min median `itr/sec`
#> <bch:expr> <bch:tm> <bch:tm> <dbl>
#> 1 rnorm(N) 607µs 660.2µs 1451.
#> 2 dqrnorm(N) 89.8µs 92.7µs 9896.
#> 1 rnorm(N) 610µs 709µs 1322.
#> 2 dqrnorm(N) 197µs 222µs 4411.
```

This is also true for the provided sampling functions with replacement:
Expand All @@ -79,10 +79,10 @@ bm[, 1:4]
#> # A tibble: 4 × 4
#> expression min median `itr/sec`
#> <bch:expr> <bch:tm> <bch:tm> <dbl>
#> 1 sample.int(m, n, replace = TRUE) 6.88ms 7.08ms 139.
#> 2 sample.int(1000 * m, n, replace = TRUE) 8.72ms 8.93ms 110.
#> 3 dqsample.int(m, n, replace = TRUE) 410.9µs 434.24µs 2137.
#> 4 dqsample.int(1000 * m, n, replace = TRUE) 397.74µs 435.38µs 1930.
#> 1 sample.int(m, n, replace = TRUE) 7.2ms 7.7ms 120.
#> 2 sample.int(1000 * m, n, replace = TRUE) 8.8ms 9.84ms 100.
#> 3 dqsample.int(m, n, replace = TRUE) 435.2µs 497.26µs 1896.
#> 4 dqsample.int(1000 * m, n, replace = TRUE) 446µs 496.73µs 1780.
```

And without replacement:
Expand All @@ -100,11 +100,11 @@ bm[, 1:4]
#> # A tibble: 5 × 4
#> expression min median `itr/sec`
#> <bch:expr> <bch:tm> <bch:tm> <dbl>
#> 1 sample.int(m, n) 22.73ms 24.05ms 36.9
#> 2 sample.int(1000 * m, n) 12.07ms 13.85ms 68.1
#> 3 sample.int(m, n, useHash = TRUE) 9.57ms 12.63ms 74.4
#> 4 dqsample.int(m, n) 1.11ms 1.2ms 696.
#> 5 dqsample.int(1000 * m, n) 1.95ms 2.69ms 293.
#> 1 sample.int(m, n) 42.52ms 43.95ms 16.3
#> 2 sample.int(1000 * m, n) 13.35ms 14.8ms 65.8
#> 3 sample.int(m, n, useHash = TRUE) 9.72ms 11.34ms 85.8
#> 4 dqsample.int(m, n) 717.13µs 915.69µs 846.
#> 5 dqsample.int(1000 * m, n) 1.47ms 2.13ms 384.
```

Note that sampling from `10^10` elements triggers “long-vector support”
Expand Down

0 comments on commit b5dd82f

Please sign in to comment.