Skip to content

Commit

Permalink
upgrade github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jefferis committed Aug 28, 2023
1 parent 4df900b commit 1a9f371
Showing 1 changed file with 34 additions and 35 deletions.
69 changes: 34 additions & 35 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,66 +16,65 @@ jobs:
R-CMD-check:
runs-on: ubuntu-latest
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
CHUNKEDGRAPH_SECRET: ${{ secrets.CHUNKEDGRAPH_SECRET }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
FLYTABLE_TOKEN: ${{ secrets.FLYTABLE_TOKEN }}
RETICULATE_MINICONDA_PYTHON_VERSION: 3.8
RGL_USE_NULL: true
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RGL_USE_NULL: TRUE
_R_CHECK_DONTTEST_EXAMPLES_: FALSE
_R_CHECK_CRAN_INCOMING_REMOTE_: false
_R_CHECK_TESTS_NLINES_: 0
_R_CHECK_CRAN_INCOMING_REMOTE_: false

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- uses: r-lib/actions/setup-pandoc@v2

- name: Install system dependencies
if: runner.os == 'Linux'
run: |
while read -r cmd
do
eval sudo $cmd
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))')
- uses: r-lib/actions/setup-pandoc@v2

- name: Install dependencies
run: |
install.packages(c("remotes", "rcmdcheck"))
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("covr")
remotes::install_cran("pkgdown")
shell: Rscript {0}
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck, any::pkgdown, catmaid=natverse/rcatmaid
needs: check

- name: Fix Conda permissions on macOS
if: runner.os == 'macOS'
run: sudo chown -R $UID $CONDA

- name: Install fafbseg + python
run: |
remotes::install_local()
pak::local_install()
library(fafbseg)
simple_python(pkgs="caveclient")
simple_python()
dr_fafbseg()
shell: Rscript {0}

- name: writetoken
run: fafbseg::flywire_set_token(token=Sys.getenv("CHUNKEDGRAPH_SECRET"))
shell: Rscript {0}

- name: Check
run: |
options(crayon.enabled = TRUE)
rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error")
shell: Rscript {0}
- uses: r-lib/actions/check-r-package@v2

- 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

- name: Deploy package
run: |
git config --local user.email "actions@github.com"
git config --local user.name "GitHub Actions"
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'
- name: Upload check log results
if: failure()
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.config.tag }}-results
path: ${{ github.event.repository.name }}.Rcheck/00check.log

- name: Test coverage
# if: runner.os == 'macOS'
if: ${{ runner.os == 'Linux' && matrix.config.r == 'release'}}
run: covr::codecov(errorsAreFatal=FALSE)
shell: Rscript {0}

0 comments on commit 1a9f371

Please sign in to comment.