Skip to content

Try coveralls repo token #49

Try coveralls repo token

Try coveralls repo token #49

# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
on:
- push
- pull_request
name: test-coverage
jobs:
test-coverage:
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
config:
- {os: ubuntu-latest, r: 'release', julia: '1.10'}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- name: Cache R packages and Julia packages
uses: actions/cache@v3
with:
path: | # siehe https://github.com/r-lib/actions/blob/v2/setup-r-dependencies/action.yaml
${{ env.R_LIBS_USER }}/*
!${{ env.R_LIBS_USER }}/pak
~/.julia/artifacts/
~/.julia/packages/
key: ${{ matrix.config.r }}-${{ matrix.config.julia }}-${{ hashFiles('DESCRIPTION') }}
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: covr, local::.
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.config.julia }}
- name: Make sure the JuliaConnectoR will pick up the right Julia version
run: |
GITHUB_ACTIONS_JULIACONNECTOR_JULIAVERSION=$(Rscript -e "cat(JuliaConnectoR:::getJuliaVersionViaCmd())");
if [[ ! $GITHUB_ACTIONS_JULIACONNECTOR_JULIAVERSION == "${{ matrix.config.julia }}"* ]]; then
echo "Julia version is $GITHUB_ACTIONS_JULIACONNECTOR_JULIAVERSION";
echo "Julia version should be ${{ matrix.config.julia }}";
exit 1;
fi
- name: Test coverage
run: covr::coveralls(repo_token = Sys.getenv("COVERALLS_REPO_TOKEN"), type = c("tests", "examples"))
shell: Rscript {0}