|
1 | | -# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag. |
2 | | -# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions |
| 1 | +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples |
| 2 | +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help |
3 | 3 | on: |
4 | 4 | push: |
5 | | - branches: |
6 | | - - main |
7 | | - - master |
| 5 | + branches: [main, master] |
8 | 6 | pull_request: |
9 | | - branches: |
10 | | - - main |
11 | | - - master |
12 | 7 |
|
13 | | -name: R-CMD-check |
| 8 | +name: R-CMD-check.yaml |
| 9 | + |
| 10 | +permissions: read-all |
14 | 11 |
|
15 | 12 | jobs: |
16 | 13 | R-CMD-check: |
17 | | - runs-on: ubuntu-latest |
| 14 | + runs-on: ${{ matrix.config.os }} |
| 15 | + |
| 16 | + name: ${{ matrix.config.os }} (${{ matrix.config.r }}) |
| 17 | + |
| 18 | + strategy: |
| 19 | + fail-fast: false |
| 20 | + matrix: |
| 21 | + config: |
| 22 | + - {os: macos-latest, r: 'release'} |
| 23 | + - {os: windows-latest, r: 'release'} |
| 24 | + - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} |
| 25 | + - {os: ubuntu-latest, r: 'release'} |
| 26 | + - {os: ubuntu-latest, r: 'oldrel-1'} |
| 27 | + |
18 | 28 | env: |
19 | | - R_REMOTES_NO_ERRORS_FROM_WARNINGS: true |
20 | 29 | GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} |
21 | | - CHUNKEDGRAPH_SECRET: ${{ secrets.CHUNKEDGRAPH_SECRET }} |
22 | | - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
23 | | - FLYTABLE_TOKEN: ${{ secrets.FLYTABLE_TOKEN }} |
24 | | - RETICULATE_MINICONDA_PYTHON_VERSION: 3.8 |
25 | | - RGL_USE_NULL: TRUE |
26 | | - _R_CHECK_DONTTEST_EXAMPLES_: FALSE |
27 | | - _R_CHECK_TESTS_NLINES_: 0 |
28 | | - _R_CHECK_CRAN_INCOMING_REMOTE_: false |
| 30 | + R_KEEP_PKG_SOURCE: yes |
29 | 31 |
|
30 | 32 | steps: |
31 | 33 | - uses: actions/checkout@v4 |
32 | 34 |
|
| 35 | + - uses: r-lib/actions/setup-pandoc@v2 |
| 36 | + |
33 | 37 | - uses: r-lib/actions/setup-r@v2 |
34 | 38 | with: |
| 39 | + r-version: ${{ matrix.config.r }} |
| 40 | + http-user-agent: ${{ matrix.config.http-user-agent }} |
35 | 41 | use-public-rspm: true |
36 | 42 |
|
37 | | - - uses: r-lib/actions/setup-pandoc@v2 |
38 | | - |
39 | 43 | - uses: r-lib/actions/setup-r-dependencies@v2 |
40 | 44 | with: |
41 | | - extra-packages: any::rcmdcheck, any::pkgdown, catmaid=natverse/rcatmaid |
| 45 | + extra-packages: any::rcmdcheck |
42 | 46 | needs: check |
43 | 47 |
|
44 | | - - name: Fix Conda permissions on macOS |
45 | | - if: runner.os == 'macOS' |
46 | | - run: sudo chown -R $UID $CONDA |
47 | | - |
48 | | - - name: Install fafbseg + python |
49 | | - run: | |
50 | | - pak::local_install() |
51 | | - pak::pak('natverse/coconatfly') |
52 | | - library(bancr) |
53 | | - library(fafbseg) |
54 | | - simple_python() |
55 | | - simple_python('none', pkgs='cloud-volume~=8.32.1') |
56 | | - dr_banc() |
57 | | - shell: Rscript {0} |
58 | | - |
59 | | - - name: writetoken |
60 | | - run: fafbseg::flywire_set_token(token=Sys.getenv("CHUNKEDGRAPH_SECRET")) |
61 | | - shell: Rscript {0} |
62 | | - |
63 | 48 | - uses: r-lib/actions/check-r-package@v2 |
64 | | - |
65 | | - - name: Upload check results |
66 | | - if: failure() |
67 | | - uses: actions/upload-artifact@v4 |
68 | 49 | with: |
69 | | - name: ${{ runner.os }}-r${{ matrix.config.r }}-results |
70 | | - path: check |
71 | | - |
72 | | - - name: Upload check log results |
73 | | - if: failure() |
74 | | - uses: actions/upload-artifact@v4 |
75 | | - with: |
76 | | - name: ${{ matrix.config.tag }}-results |
77 | | - path: ${{ github.event.repository.name }}.Rcheck/00check.log |
78 | | - |
79 | | - - name: Test coverage |
80 | | - # if: runner.os == 'macOS' |
81 | | - if: ${{ runner.os == 'Linux' && matrix.config.r == 'release'}} |
82 | | - run: covr::codecov(errorsAreFatal=FALSE) |
83 | | - shell: Rscript {0} |
| 50 | + upload-snapshots: true |
| 51 | + build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")' |
0 commit comments