Skip to content

Commit

Permalink
test-build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
agmcfarland authored Jul 31, 2024
1 parent 9e36bd9 commit baa6069
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/r.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
#
# See https://github.com/r-lib/actions/tree/master/examples#readme for
# additional example workflows available for the R community.

name: R-test

on:
push:
branches: [ "main" ]

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
r-version: ['4.1.1']

env:
GITHUB_PAT: ${{ secrets.MY_TOKEN }}

steps:
- uses: actions/checkout@v4
- name: Set up R ${{ matrix.r-version }}
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.r-version }}
use-public-rspm: true

- name: Install system libraries
if: runner.os == 'Linux'
run: sudo apt-get install -y libcurl4-openssl-dev

- name: Install base R dependencies
run: |
install.packages(c("remotes", "devtools", "rcmdcheck"))
remotes::install_deps(dependencies = TRUE)
shell: Rscript {0}

- name: Session info 1
run: |
options(width = 100)
pkgs <- installed.packages()[, "Package"]
sessioninfo::session_info(pkgs, include_base = TRUE)
shell: Rscript {0}

- name: Install package dependencies
uses: r-lib/actions/setup-r-dependencies@v2

- name: Session info 2
run: |
options(width = 100)
pkgs <- installed.packages()[, "Package"]
sessioninfo::session_info(pkgs, include_base = TRUE)
shell: Rscript {0}

- name: Run tests
run: devtools::test()
shell: Rscript {0}

0 comments on commit baa6069

Please sign in to comment.