Merge pull request #1011 from stan-dev/fix-pathfinder-test #1927
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
--- | |
# Github Actions workflow to analyze CmdStanR code, test coverage | |
# yamllint disable rule:line-length | |
name: Test coverage | |
'on': | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
test-coverage: | |
if: "! contains(github.event.head_commit.message, '[ci skip]')" | |
runs-on: ${{ matrix.config.os }} | |
name: ${{ matrix.config.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- { os: windows-latest } | |
- { os: ubuntu-latest } | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
NOT_CRAN: true | |
steps: | |
- name: cmdstan env vars | |
run: | | |
echo "CMDSTAN_PATH=${HOME}/.cmdstan" >> $GITHUB_ENV | |
shell: bash | |
- uses: n1hility/cancel-previous-runs@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
workflow: Test-coverage.yml | |
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'" | |
- uses: actions/checkout@v4 | |
- uses: r-lib/actions/[email protected] | |
- uses: r-lib/actions/[email protected] | |
- uses: r-lib/actions/[email protected] | |
with: | |
extra-packages: any::rcmdcheck, local::., any::covr, any::gridExtra | |
- name: Install cmdstan | |
run: | | |
cmdstanr::check_cmdstan_toolchain(fix = TRUE) | |
cmdstanr::install_cmdstan(cores = 2) | |
shell: Rscript {0} | |
- name: Test coverage (Linux) | |
if: runner.os == 'Linux' | |
run: covr::codecov(type = "tests") | |
shell: Rscript {0} | |
- name: Test coverage (Windows) | |
if: runner.os == 'Windows' | |
run: | | |
options(covr.gcov = 'C:/rtools44/mingw64/bin/gcov.exe'); | |
covr::codecov(type = "tests", function_exclusions = "sample_mpi") | |
shell: Rscript {0} |