Run codecov using Julia 1.10 #45
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
# 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 }} | |
CODECOV_TOKEN: ${{ secrets.CODECOV_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::codecov(type = c("tests", "examples")) | |
shell: Rscript {0} |