|
| 1 | +# Adapted from: https://github.com/ready4-dev/ready4class/runs/3657635374?check_suite_focus=true |
| 2 | +# |
| 3 | +# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag. |
| 4 | +# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions |
| 5 | +on: |
| 6 | + push: |
| 7 | + branches: |
| 8 | + - main |
| 9 | + - master |
| 10 | + pull_request: |
| 11 | + branches: |
| 12 | + - main |
| 13 | + - master |
| 14 | + |
| 15 | +name: R-CMD-check |
| 16 | + |
| 17 | +jobs: |
| 18 | + R-CMD-check: |
| 19 | + runs-on: ${{ matrix.config.os }} |
| 20 | + |
| 21 | + name: ${{ matrix.config.os }} (${{ matrix.config.r }}) |
| 22 | + |
| 23 | + strategy: |
| 24 | + fail-fast: false |
| 25 | + matrix: |
| 26 | + config: |
| 27 | + - {os: macOS-latest, r: 'release'} |
| 28 | + - {os: windows-latest, r: 'release'} |
| 29 | + - {os: ubuntu-latest, r: 'release'} |
| 30 | + #- {os: windows-latest, r: '3.6'} |
| 31 | +# - {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest", http-user-agent: "R/4.0.0 (ubuntu-20.04) R (4.0.0 x86_64-pc-linux-gnu x86_64 linux-gnu) on GitHub Actions" } |
| 32 | +# - {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} |
| 33 | + #- {os: ubuntu-20.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} |
| 34 | + |
| 35 | + env: |
| 36 | + R_REMOTES_NO_ERRORS_FROM_WARNINGS: true |
| 37 | + RSPM: ${{ matrix.config.rspm }} |
| 38 | + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} |
| 39 | + |
| 40 | + steps: |
| 41 | + - uses: actions/checkout@v3 # |
| 42 | + - uses: r-lib/actions/setup-r@v2 |
| 43 | + # with: |
| 44 | + # r-version: ${{ matrix.config.r }} |
| 45 | + # http-user-agent: ${{ matrix.config.http-user-agent }} |
| 46 | + # use-public-rspm: true |
| 47 | + - uses: r-lib/actions/setup-tinytex@v2 |
| 48 | + - run: tlmgr --version |
| 49 | + - uses: r-lib/actions/setup-pandoc@v2 |
| 50 | + with: |
| 51 | + pandoc-version: '2.17.1' # The pandoc version to download (if necessary) and use. |
| 52 | + - run: echo "# Test" | pandoc -t html |
| 53 | + # Addresses issue with incompatibility between libcurl4-gnutls-dev and libcurl4-openssl-dev |
| 54 | + # Below fix is a customisation of approach outlined in https://github.com/r-hub/sysreqsdb/issues/77#issuecomment-620025428 |
| 55 | + - name: Install libraptor on Linux |
| 56 | + if: runner.os == 'Linux' |
| 57 | + run: | |
| 58 | + sudo add-apt-repository ppa:cran/librdf |
| 59 | + sudo apt update |
| 60 | + - uses: r-lib/actions/setup-r-dependencies@v2 |
| 61 | + with: |
| 62 | + extra-packages: any::XML, any::rcmdcheck |
| 63 | + needs: check |
| 64 | + - uses: r-lib/actions/check-r-package@v2 |
| 65 | + with: |
| 66 | + args: 'c("--no-manual", "--as-cran")' |
| 67 | + error-on: '"error"' |
| 68 | + check-dir: '"check"' |
0 commit comments