diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index 4fb41712..e3b25b88 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -1,12 +1,4 @@ -# 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 +name: Build umx for R on: push: @@ -22,19 +14,30 @@ jobs: runs-on: macos-latest strategy: matrix: - r-version: ['3.6.3', '4.1.1'] - + r-version: ['4.2', '4.4.1'] steps: + - uses: actions/cache@v3 - uses: actions/checkout@v4 + with: + path: ~/.R/library + key: ${{ runner.os }}-r-${{ matrix.r-version }}-${{ hashFiles('**/DESCRIPTION') }} + restore-keys: | + ${{ runner.os }}-r-${{ matrix.r-version }}- + ${{ runner.os }}-r- - name: Set up R ${{ matrix.r-version }} - uses: r-lib/actions/setup-r@f57f1301a053485946083d7a45022b278929a78a + uses: r-lib/actions/setup-r@v2 with: r-version: ${{ matrix.r-version }} - name: Install dependencies run: | - install.packages(c("remotes", "rcmdcheck")) + install.packages(c("remotes", "rcmdcheck", "covr")) remotes::install_deps(dependencies = TRUE) shell: Rscript {0} - - name: Check - run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error") + - name: Check package + run: | + rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error") + devtools::check() + shell: Rscript {0} + - name: Code Coverage + run: covr::codecov() shell: Rscript {0}