Fixes #22 C# gha workflow (#143) #46
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: [main] | |
workflow_run: | |
workflows: ["build-c#-binaries"] | |
types: | |
- completed | |
workflow_dispatch: | |
name: test-coverage | |
jobs: | |
test-coverage: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
use-public-rspm: true | |
- name: install ubuntu dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install dotnet-runtime-8.0 libcurl4-openssl-dev libssl-dev libxml2-dev | |
sudo apt-get install libfontconfig1-dev libharfbuzz-dev libfribidi-dev | |
sudo apt-get install libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev | |
sudo ln -s /usr/lib/x86_64-linux-gnu/libdl.so.2 /usr/lib/x86_64-linux-gnu/libdl.so | |
- uses: r-lib/actions/setup-r-dependencies@v2 | |
with: | |
extra-packages: any::covr | |
needs: coverage | |
- name: Test coverage | |
run: | | |
covr::codecov( | |
quiet = FALSE, | |
clean = FALSE, | |
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 | |
shell: bash | |
- name: Upload test results | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage-test-failures | |
path: ${{ runner.temp }}/package |