Skip to content

correction

correction #20

on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
name: test-coverage
permissions:
contents: read
actions: write
jobs:
test-coverage:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
RETICULATE_AUTOCONFIGURE: 'FALSE'
steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: |
any::covr
any::xml2
any::remotes
any::reticulate
any::devtools
- name: Install Homebrew and qpdf (macOS only)
if: runner.os == 'macOS'
uses: Homebrew/actions/setup-homebrew@master
- name: Install qpdf (macOS only)
if: runner.os == 'macOS'
shell: bash
run: brew install qpdf
- name: Install system dependencies
if: runner.os == 'Linux'
shell: bash
run: |
. /etc/os-release
while read -r cmd
do
echo "$cmd"
sudo $cmd
done < <(Rscript -e "writeLines(remotes::system_requirements('$ID-$VERSION_ID'))")
- name: Install greta and dependencies
shell: Rscript {0}
run: |
install.packages("greta", repos = c("https://greta-dev.r-universe.dev", "https://cloud.r-project.org"))
library(greta)
install_greta_deps(timeout = 120)
- uses: codecov/codecov-action@v4
with:
fail_ci_if_error: ${{ github.event_name != 'pull_request' && true || false }}
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