| # Workflow derived from https://github.com/r-lib/actions/tree/master/examples |
| # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help |
| # |
| # NOTE: This workflow is overkill for most R packages and |
| # check-standard.yaml is likely a better choice. |
| # usethis::use_github_action("check-standard") will install it. |
| on: |
| push: |
| branches: [main, master] |
| pull_request: |
| branches: [main, master] |
| |
| name: R-CMD-check |
| |
| jobs: |
| R-CMD-check: |
| runs-on: ${{ matrix.config.os }} |
| |
| name: ${{ matrix.config.os }} (${{ matrix.config.r }}) [Pandoc ${{ matrix.config.pandoc }}] |
| |
| strategy: |
| fail-fast: false |
| matrix: |
| config: |
| # testing R release with last shipped pandoc version in RStudio IDE and new pandoc |
| - {os: macOS-latest, pandoc: '2.11.4', r: 'release'} |
| - {os: macOS-latest, pandoc: '2.14.2', r: 'release'} |
| |
| # TODO: issue on windows with pandoc 2.11.4 - change when fixed |
| - {os: windows-latest, pandoc: '2.7.3', r: 'release'} |
| # Use 3.6 to trigger usage of RTools35 |
| - {os: windows-latest, pandoc: '2.7.3', r: '3.6'} |
| |
| # Use older ubuntu to maximise backward compatibility |
| - {os: ubuntu-18.04, pandoc: '2.11.4', r: 'devel', http-user-agent: 'release'} |
| - {os: ubuntu-18.04, pandoc: 'devel', r: 'release'} |
| - {os: ubuntu-18.04, pandoc: '2.14.2', r: 'release'} |
| - {os: ubuntu-18.04, pandoc: '2.11.4', r: 'release'} |
| - {os: ubuntu-18.04, pandoc: '2.11.4', r: 'oldrel-1'} |
| |
| env: |
| GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} |
| R_KEEP_PKG_SOURCE: yes |
| |
| steps: |
| - uses: actions/checkout@v2 |
| |
| - uses: r-lib/actions/setup-pandoc@v1 |
| if: matrix.config.pandoc != 'devel' |
| with: |
| pandoc-version: ${{ matrix.config.pandoc }} |
| |
| - uses: cderv/actions/setup-pandoc-nightly@nightly-pandoc |
| if: matrix.config.pandoc == 'devel' |
| |
| - uses: r-lib/actions/setup-r@v1 |
| with: |
| r-version: ${{ matrix.config.r }} |
| http-user-agent: ${{ matrix.config.http-user-agent }} |
| use-public-rspm: true |
| |
| - uses: r-lib/actions/setup-r-dependencies@v1 |
| with: |
| extra-packages: rcmdcheck |
| |
| - uses: r-lib/actions/check-r-package@master |
| |
| - name: Show testthat output |
| if: always() |
| run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true |
| shell: bash |
| |
| - name: Upload check results |
| if: failure() |
| uses: actions/upload-artifact@main |
| with: |
| name: ${{ runner.os }}-r${{ matrix.config.r }}-results |
| path: check |