Skip to content

ci: use docker container for R deps #17

ci: use docker container for R deps

ci: use docker container for R deps #17

Workflow file for this run

# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples

Check failure on line 1 in .github/workflows/test-coverage.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/test-coverage.yaml

Invalid workflow file

(Line: 19, Col: 16): Unrecognized named-value: 'env'. Located at position 1 within expression: env.CONTAINER
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master, dev, DEV]
pull_request:
branches: [main, master, dev, DEV]
name: test-coverage
permissions: read-all
env:
CONTAINER: nciccbr/scworkflow:v1.0.2_79e5d37
jobs:
test-coverage:
runs-on: ubuntu-latest
container: ${{ env.CONTAINER }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-r-dependencies@v2
with:
needs: dev
- name: Test coverage
run: |
cov <- covr::package_coverage(
quiet = FALSE,
clean = FALSE,
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
)
covr::to_cobertura(cov)
shell: Rscript {0}
- uses: codecov/codecov-action@v4
with:
fail_ci_if_error: ${{ github.event_name != 'pull_request' && true || false }}
file: ./cobertura.xml
plugin: noop
disable_search: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Show testthat output
if: always()
run: |
## --------------------------------------------------------------------
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash
- name: Upload test results
if: failure()
uses: actions/upload-artifact@v4
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package