diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index 357e76b..21b8a93 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -1,23 +1,25 @@ +# 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] - workflow_dispatch: name: test-coverage jobs: test-coverage: - runs-on: macOS-latest + runs-on: ubuntu-latest env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + steps: - uses: actions/checkout@v4 - uses: r-lib/actions/setup-r@v2 - - - uses: r-lib/actions/setup-pandoc@v2 + with: + use-public-rspm: true - uses: r-lib/actions/setup-r-dependencies@v2 with: @@ -29,7 +31,7 @@ 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} @@ -37,7 +39,7 @@ jobs: 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 @@ -45,4 +47,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: coverage-test-failures - path: ${{ runner.temp }}/package \ No newline at end of file + path: ${{ runner.temp }}/package diff --git a/README.md b/README.md index 9200d2d..5039e5c 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ [![R build status](https://github.com/MRCIEU/ieugwasr/workflows/R-CMD-check/badge.svg)](https://github.com/MRCIEU/ieugwasr/actions) [![CRAN status](https://www.r-pkg.org/badges/version/ieugwasr)](https://CRAN.R-project.org/package=ieugwasr) [![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable) +[![Codecov test coverage](https://codecov.io/gh/MRCIEU/ieugwasr/branch/master/graph/badge.svg)](https://app.codecov.io/gh/MRCIEU/ieugwasr?branch=master) The [OpenGWAS database](https://gwas.mrcieu.ac.uk/) comprises over 50,000 curated, QC'd and harmonised complete GWAS summary datasets and can be queried using an API. See [here](https://api.opengwas.io/api/) for documentation on the API itself. This R package is a wrapper to make generic calls to the API, plus convenience functions for specific queries. diff --git a/codecov.yml b/codecov.yml index 04c5585..902f26b 100644 --- a/codecov.yml +++ b/codecov.yml @@ -12,3 +12,6 @@ coverage: target: auto threshold: 1% informational: true + +codecov: + token: 9dd0881a-47f3-4c04-8dc6-fedd9dfa8206 \ No newline at end of file