Fix cmdstanr setup #181
Workflow file for this run
This file contains hidden or 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
| name: check-interfaces | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - ".github/workflows/interfaces.yaml" | |
| - "DESCRIPTION" | |
| - "NAMESPACE" | |
| - "R/interfaces.R" | |
| - "R/utils.R" | |
| - "tests/testthat/helper-interfaces-ci.R" | |
| - "tests/testthat/test-interfaces.R" | |
| - "tests/testthat/test-interfaces-*-ci.R" | |
| - "tests/testthat/test-cmdstanr-ci.R" | |
| pull_request: | |
| paths: | |
| - ".github/workflows/interfaces.yaml" | |
| - "DESCRIPTION" | |
| - "NAMESPACE" | |
| - "R/interfaces.R" | |
| - "R/utils.R" | |
| - "tests/testthat/helper-interfaces-ci.R" | |
| - "tests/testthat/test-interfaces.R" | |
| - "tests/testthat/test-interfaces-*-ci.R" | |
| - "tests/testthat/test-cmdstanr-ci.R" | |
| workflow_dispatch: | |
| permissions: read-all | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test-interface: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| interface: [cmdstanr, rstan, brms, rstanarm] | |
| name: Test ${{ matrix.interface }} (${{ matrix.os }}) | |
| env: | |
| GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: r-lib/actions/setup-r@v2 | |
| with: | |
| r-version: release | |
| use-public-rspm: true | |
| extra-repositories: | | |
| https://community.r-multiverse.org | |
| https://stan-dev.r-universe.dev | |
| - uses: r-lib/actions/setup-r-dependencies@v2 | |
| with: | |
| dependencies: '"hard"' | |
| extra-packages: local::., any::testthat | |
| - name: Test setup_interface (testthat) | |
| env: | |
| STANFLOW_INTERFACES_CI: "true" | |
| run: | | |
| Rscript -e 'testthat::test_file("tests/testthat/test-interfaces-${{ matrix.interface }}-ci.R", stop_on_failure = TRUE)' | |
| # Test cmdstanr-specific scenarios | |
| test-cmdstanr-scenarios: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| scenario: | |
| - name: reinstall | |
| check_updates: true | |
| reinstall: true | |
| - name: check-update-no-reinstall | |
| check_updates: true | |
| reinstall: false | |
| - name: no-update-check | |
| check_updates: false | |
| reinstall: false | |
| name: cmdstanr - ${{ matrix.scenario.name }} | |
| env: | |
| GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: r-lib/actions/setup-r@v2 | |
| with: | |
| r-version: release | |
| use-public-rspm: true | |
| extra-repositories: | | |
| https://community.r-multiverse.org | |
| https://stan-dev.r-universe.dev | |
| - uses: r-lib/actions/setup-r-dependencies@v2 | |
| with: | |
| dependencies: '"hard"' | |
| extra-packages: local::., any::testthat | |
| - name: Test setup_cmdstanr (testthat) | |
| env: | |
| STANFLOW_CMDSTANR_CI: "true" | |
| STANFLOW_CMDSTANR_CHECK_UPDATES: ${{ matrix.scenario.check_updates }} | |
| STANFLOW_CMDSTANR_REINSTALL: ${{ matrix.scenario.reinstall }} | |
| run: | | |
| Rscript -e 'testthat::test_file("tests/testthat/test-cmdstanr-ci.R", stop_on_failure = TRUE)' |