Skip to content

Commit

Permalink
Update continuous integration
Browse files Browse the repository at this point in the history
  • Loading branch information
billdenney committed Apr 19, 2023
1 parent dbe2bcd commit 38b6bc4
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 52 deletions.
56 changes: 11 additions & 45 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
Expand All @@ -18,7 +18,7 @@ jobs:
fail-fast: false
matrix:
config:
- {os: macOS-latest, r: 'release'}
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
Expand All @@ -29,63 +29,29 @@ jobs:
R_KEEP_PKG_SOURCE: yes

steps:
- name: Install X11 dependencies on MacOS
if: runner.os == 'macOS'
run: brew install --cask xquartz
shell: bash

- name: Install deps on MacOS
if: runner.os == 'macOS'
run: |
brew install --cask xquartz
brew install cairo
brew install libgit2
brew install udunits
shell: bash

- name: Link gfortran on MacOS
if: runner.os == 'macOS'
run: |
sudo ln -s /usr/local/bin/gfortran-10 /usr/local/bin/gfortran
sudo mkdir /usr/local/gfortran
sudo ln -s /usr/local/gfortran-10 /usr/local/gfortran
shell: bash
- uses: actions/checkout@v3

- name: Create Makevars for Fortran linking options on macOS
if: runner.os == 'macOS'
run: |
try(dir.create("~/.R"))
writeLines(c("GCCBASE:=$(shell brew --prefix gcc)","FLIBS=-L$(GCCBASE)/lib/gcc/10/lib -lm",""),"~/.R/Makevars")
shell: Rscript {0}
- uses: r-lib/actions/setup-pandoc@v2

- uses: actions/checkout@v2

- uses: r-lib/actions/setup-pandoc@v1

- name: Install Symengine from source for MacOS
if: runner.os == 'macOS'
run: install.packages("symengine", type="source")
shell: Rscript {0}

- uses: r-lib/actions/setup-r@v1
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v1
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: rcmdcheck

- uses: r-lib/actions/check-r-package@v1

- name: Show testthat output
if: always()
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash
extra-packages: any::rcmdcheck
needs: check

- name: Upload check results
if: failure()
uses: actions/upload-artifact@main
- uses: r-lib/actions/check-r-package@v2
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check
upload-snapshots: true
32 changes: 26 additions & 6 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
Expand All @@ -15,16 +15,36 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

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

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

- uses: r-lib/actions/setup-r-dependencies@v1
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: covr
extra-packages: any::covr
needs: coverage

- name: Test coverage
run: covr::codecov()
run: |
covr::codecov(
quiet = FALSE,
clean = FALSE,
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
)
shell: Rscript {0}

- name: Show testthat output
if: always()
run: |
## --------------------------------------------------------------------
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload test results
if: failure()
uses: actions/upload-artifact@v3
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ knitr::opts_chunk$set(
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![CRAN status](https://www.r-pkg.org/badges/version/nlmixr2targets)](https://CRAN.R-project.org/package=nlmixr2targets)
[![R Targetopia](https://img.shields.io/badge/R_Targetopia-member-blue?style=flat&labelColor=gray)](https://wlandau.github.io/targetopia/)
[![R-CMD-check](https://github.com/nlmixr2/nlmixr2targets/workflows/R-CMD-check/badge.svg)](https://github.com/nlmixr2/nlmixr2targets/actions)
[![R-CMD-check](https://github.com/nlmixr2/nlmixr2targets/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/nlmixr2/nlmixr2targets/actions/workflows/R-CMD-check.yaml)
[![Code_Coverage_Badge](http://codecov.io/github/nlmixr2/nlmixr2targets/coverage.svg?branch=main)](http://codecov.io/github/nlmixr2/nlmixr2targets?branch=main)
<!-- badges: end -->

Expand Down

0 comments on commit 38b6bc4

Please sign in to comment.