apexcharter/.github/workflows/test-coverage.yaml

51 lines
1.3 KiB
YAML
Raw Normal View History

2023-06-13 18:36:14 +02:00
# 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
2021-01-07 09:52:06 +01:00
on:
push:
2023-06-13 18:36:14 +02:00
branches: [main, master]
2021-01-07 09:52:06 +01:00
pull_request:
2023-06-13 18:36:14 +02:00
branches: [main, master]
2021-01-07 09:52:06 +01:00
name: test-coverage
jobs:
test-coverage:
2023-06-13 18:36:14 +02:00
runs-on: ubuntu-latest
2021-01-07 09:52:06 +01:00
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
2023-06-13 18:36:14 +02:00
2021-01-07 09:52:06 +01:00
steps:
2023-06-13 18:36:14 +02:00
- uses: actions/checkout@v3
2021-01-07 09:52:06 +01:00
2023-06-13 18:36:14 +02:00
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
2021-01-07 09:52:06 +01:00
2023-06-13 18:36:14 +02:00
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::covr
needs: coverage
2021-01-07 09:52:06 +01:00
2023-06-13 18:36:14 +02:00
- name: Test coverage
2021-01-07 09:52:06 +01:00
run: |
2023-06-13 18:36:14 +02:00
covr::codecov(
quiet = FALSE,
clean = FALSE,
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
)
2021-01-07 09:52:06 +01:00
shell: Rscript {0}
2023-06-13 18:36:14 +02:00
- name: Show testthat output
if: always()
2021-01-07 09:52:06 +01:00
run: |
2023-06-13 18:36:14 +02:00
## --------------------------------------------------------------------
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash
2021-01-07 09:52:06 +01:00
2023-06-13 18:36:14 +02:00
- name: Upload test results
if: failure()
uses: actions/upload-artifact@v3
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package