christophe dervieux | 76d730d | 2021-09-15 15:02:02 +0200 | [diff] [blame] | 1 | # Workflow derived from https://github.com/r-lib/actions/tree/master/examples |
| 2 | # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help |
| 3 | # |
| 4 | # NOTE: This workflow is overkill for most R packages and |
| 5 | # check-standard.yaml is likely a better choice. |
| 6 | # usethis::use_github_action("check-standard") will install it. |
| 7 | on: |
| 8 | push: |
| 9 | branches: [main, master] |
| 10 | pull_request: |
| 11 | branches: [main, master] |
| 12 | |
| 13 | name: R-CMD-check |
| 14 | |
| 15 | jobs: |
| 16 | R-CMD-check: |
| 17 | runs-on: ${{ matrix.config.os }} |
| 18 | |
Christophe Dervieux | 21239cf | 2021-09-15 15:34:01 +0200 | [diff] [blame^] | 19 | name: ${{ matrix.config.os }} (${{ matrix.config.r }}) [Pandoc ${{ matrix.config.pandoc }}] |
christophe dervieux | 76d730d | 2021-09-15 15:02:02 +0200 | [diff] [blame] | 20 | |
| 21 | strategy: |
| 22 | fail-fast: false |
| 23 | matrix: |
| 24 | config: |
Christophe Dervieux | 21239cf | 2021-09-15 15:34:01 +0200 | [diff] [blame^] | 25 | # testing R release with last shipped pandoc version in RStudio IDE and new pandoc |
| 26 | - {os: macOS-latest, pandoc: '2.11.4', r: 'release'} |
| 27 | - {os: macOS-latest, pandoc: '2.14.2', r: 'release'} |
christophe dervieux | 76d730d | 2021-09-15 15:02:02 +0200 | [diff] [blame] | 28 | |
Christophe Dervieux | 21239cf | 2021-09-15 15:34:01 +0200 | [diff] [blame^] | 29 | # TODO: issue on windows with pandoc 2.11.4 - change when fixed |
| 30 | - {os: windows-latest, pandoc: '2.7.3', r: 'release'} |
christophe dervieux | 76d730d | 2021-09-15 15:02:02 +0200 | [diff] [blame] | 31 | # Use 3.6 to trigger usage of RTools35 |
Christophe Dervieux | 21239cf | 2021-09-15 15:34:01 +0200 | [diff] [blame^] | 32 | - {os: windows-latest, pandoc: '2.7.3', r: '3.6'} |
christophe dervieux | 76d730d | 2021-09-15 15:02:02 +0200 | [diff] [blame] | 33 | |
| 34 | # Use older ubuntu to maximise backward compatibility |
Christophe Dervieux | 21239cf | 2021-09-15 15:34:01 +0200 | [diff] [blame^] | 35 | - {os: ubuntu-18.04, pandoc: '2.11.4', r: 'devel', http-user-agent: 'release'} |
| 36 | - {os: ubuntu-18.04, pandoc: 'devel', r: 'release'} |
| 37 | - {os: ubuntu-18.04, pandoc: '2.14.2', r: 'release'} |
| 38 | - {os: ubuntu-18.04, pandoc: '2.11.4', r: 'release'} |
| 39 | - {os: ubuntu-18.04, pandoc: '2.11.4', r: 'oldrel-1'} |
christophe dervieux | 76d730d | 2021-09-15 15:02:02 +0200 | [diff] [blame] | 40 | |
| 41 | env: |
| 42 | GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} |
| 43 | R_KEEP_PKG_SOURCE: yes |
| 44 | |
| 45 | steps: |
| 46 | - uses: actions/checkout@v2 |
| 47 | |
| 48 | - uses: r-lib/actions/setup-pandoc@v1 |
Christophe Dervieux | 21239cf | 2021-09-15 15:34:01 +0200 | [diff] [blame^] | 49 | if: matrix.config.pandoc != 'devel' |
| 50 | with: |
| 51 | pandoc-version: ${{ matrix.config.pandoc }} |
| 52 | |
| 53 | - uses: cderv/actions/setup-pandoc-nightly@nightly-pandoc |
| 54 | if: matrix.config.pandoc == 'devel' |
christophe dervieux | 76d730d | 2021-09-15 15:02:02 +0200 | [diff] [blame] | 55 | |
| 56 | - uses: r-lib/actions/setup-r@v1 |
| 57 | with: |
| 58 | r-version: ${{ matrix.config.r }} |
| 59 | http-user-agent: ${{ matrix.config.http-user-agent }} |
| 60 | use-public-rspm: true |
| 61 | |
| 62 | - uses: r-lib/actions/setup-r-dependencies@v1 |
| 63 | with: |
| 64 | extra-packages: rcmdcheck |
| 65 | |
Christophe Dervieux | 21239cf | 2021-09-15 15:34:01 +0200 | [diff] [blame^] | 66 | - uses: r-lib/actions/check-r-package@master |
christophe dervieux | 76d730d | 2021-09-15 15:02:02 +0200 | [diff] [blame] | 67 | |
| 68 | - name: Show testthat output |
| 69 | if: always() |
| 70 | run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true |
| 71 | shell: bash |
| 72 | |
| 73 | - name: Upload check results |
| 74 | if: failure() |
| 75 | uses: actions/upload-artifact@main |
| 76 | with: |
| 77 | name: ${{ runner.os }}-r${{ matrix.config.r }}-results |
| 78 | path: check |