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 | |
| 19 | name: ${{ matrix.config.os }} (${{ matrix.config.r }}) |
| 20 | |
| 21 | strategy: |
| 22 | fail-fast: false |
| 23 | matrix: |
| 24 | config: |
| 25 | - {os: macOS-latest, r: 'release'} |
| 26 | |
| 27 | - {os: windows-latest, r: 'release'} |
| 28 | # Use 3.6 to trigger usage of RTools35 |
| 29 | - {os: windows-latest, r: '3.6'} |
| 30 | |
| 31 | # Use older ubuntu to maximise backward compatibility |
| 32 | - {os: ubuntu-18.04, r: 'devel', http-user-agent: 'release'} |
| 33 | - {os: ubuntu-18.04, r: 'release'} |
| 34 | - {os: ubuntu-18.04, r: 'oldrel-1'} |
| 35 | - {os: ubuntu-18.04, r: 'oldrel-2'} |
| 36 | - {os: ubuntu-18.04, r: 'oldrel-3'} |
| 37 | - {os: ubuntu-18.04, r: 'oldrel-4'} |
| 38 | |
| 39 | env: |
| 40 | GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} |
| 41 | R_KEEP_PKG_SOURCE: yes |
| 42 | |
| 43 | steps: |
| 44 | - uses: actions/checkout@v2 |
| 45 | |
| 46 | - uses: r-lib/actions/setup-pandoc@v1 |
| 47 | |
| 48 | - uses: r-lib/actions/setup-r@v1 |
| 49 | with: |
| 50 | r-version: ${{ matrix.config.r }} |
| 51 | http-user-agent: ${{ matrix.config.http-user-agent }} |
| 52 | use-public-rspm: true |
| 53 | |
| 54 | - uses: r-lib/actions/setup-r-dependencies@v1 |
| 55 | with: |
| 56 | extra-packages: rcmdcheck |
| 57 | |
| 58 | - uses: r-lib/actions/check-r-package@v1 |
| 59 | |
| 60 | - name: Show testthat output |
| 61 | if: always() |
| 62 | run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true |
| 63 | shell: bash |
| 64 | |
| 65 | - name: Upload check results |
| 66 | if: failure() |
| 67 | uses: actions/upload-artifact@main |
| 68 | with: |
| 69 | name: ${{ runner.os }}-r${{ matrix.config.r }}-results |
| 70 | path: check |