Skip to content

Commit

Permalink
Merge pull request #37 from metrumresearchgroup/migrate-ci
Browse files Browse the repository at this point in the history
ci: switch to GitHub Actions
  • Loading branch information
barrettk authored Aug 8, 2024
2 parents f518cdb + 31469fb commit 71e8e91
Show file tree
Hide file tree
Showing 20 changed files with 93 additions and 144 deletions.
2 changes: 0 additions & 2 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
^.*\.Rproj$
^\.Rproj\.user$
^LICENSE\.md$
^.drone.yml$
^.drone.jsonnet$
^README\.Rmd$
^_pkgdown\.yml$
^docs$
Expand Down
113 changes: 0 additions & 113 deletions .drone.yml

This file was deleted.

67 changes: 67 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: CI
on:
push:
branches:
- 'main'
- 'scratch/**'
tags:
- '[0-9]+.[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+.[0-9]+'
pull_request:

jobs:
check:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
strategy:
fail-fast: false
matrix:
config:
- os: ubuntu-20.04
r: 4.0.5
- os: ubuntu-20.04
r: 4.2.3
- os: ubuntu-20.04
r: 4.3.1
- os: ubuntu-latest
r: release
env:
R_KEEP_PKG_SOURCE: yes
steps:
- uses: actions/checkout@v4
- uses: metrumresearchgroup/actions/mpn-latest@v1
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
use-public-rspm: true
extra-repositories: 'https://mpn.metworx.com/snapshots/stable/${{ env.MPN_LATEST }}'
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: |
any::pkgdown
any::rcmdcheck
upgrade: 'TRUE'
- uses: r-lib/actions/check-r-package@v2
- name: Check pkgdown
shell: Rscript {0}
run: pkgdown::check_pkgdown()
release:
if: github.ref_type == 'tag'
name: Upload release
needs: check
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- uses: metrumresearchgroup/actions/mpn-latest@v1
- uses: r-lib/actions/setup-r@v2
with:
r-version: release
use-public-rspm: true
extra-repositories: 'https://mpn.metworx.com/snapshots/stable/${{ env.MPN_LATEST }}'
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::pkgpub
- uses: metrumresearchgroup/actions/publish-r-release@v1
3 changes: 1 addition & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,5 @@ Depends:
R (>= 3.5.0)
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
RoxygenNote: 7.3.2
VignetteBuilder: knitr

2 changes: 1 addition & 1 deletion R/helpers-for-tests.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' Skip test if not on Metworx or Drone
#' Skip test if `PMF_SKIP_VDIFFR` environment variable set to `TRUE`
#'
#' Checks for custom `PMF_SKIP_VDIFFR` environment variable and skips any tests
#' that use `vdiffr` if set to `"true"`. This is useful because
Expand Down
3 changes: 1 addition & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ knitr::opts_chunk$set(
# pmforest <a href='https:/metrumresearchgroup.github.io/pmforest'><img src='man/figures/logo.png' align="right" width="135px"/></a>

<!-- badges: start -->
[![Build Status](https://github-drone.metrumrg.com/api/badges/metrumresearchgroup/pmforest/status.svg)](https://github-drone.metrumrg.com/metrumresearchgroup/pmforest)
[![codecov](https://codecov.io/gh/metrumresearchgroup/pmforest/branch/main/graph/badge.svg)](https://codecov.io/gh/metrumresearchgroup/pmforest)
[![Build Status](https://github.com/metrumresearchgroup/pmforest/actions/workflows/main.yaml/badge.svg)](https://github.com/metrumresearchgroup/pmforest/actions/workflows/main.yaml)
<!-- badges: end -->


Expand Down
21 changes: 10 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
<!-- badges: start -->

[![Build
Status](https://github-drone.metrumrg.com/api/badges/metrumresearchgroup/pmforest/status.svg)](https://github-drone.metrumrg.com/metrumresearchgroup/pmforest)
[![codecov](https://codecov.io/gh/metrumresearchgroup/pmforest/branch/main/graph/badge.svg)](https://codecov.io/gh/metrumresearchgroup/pmforest)
Status](https://github.com/metrumresearchgroup/pmforest/actions/workflows/main.yaml/badge.svg)](https://github.com/metrumresearchgroup/pmforest/actions/workflows/main.yaml)
<!-- badges: end -->

## Installation
Expand All @@ -35,13 +34,13 @@ highlighted as well.

### Featured Vignettes

- [Getting
Started](https://metrumresearchgroup.github.io/pmforest/articles/getting-started.html)
– Data specifications, summarization, and basic plotting methods.
- [Multiple
Simulations](https://metrumresearchgroup.github.io/pmforest/articles/multiple-simulations.html)
– Plotting additional confidence intervals over the ‘replicate’ or
simulation run.
- [Getting
Started](https://metrumresearchgroup.github.io/pmforest/articles/getting-started.html)
– Data specifications, summarization, and basic plotting methods.
- [Multiple
Simulations](https://metrumresearchgroup.github.io/pmforest/articles/multiple-simulations.html)
– Plotting additional confidence intervals over the ‘replicate’ or
simulation run.

## Development

Expand All @@ -56,8 +55,8 @@ replicate this environment,

3. open package in an R session and run `renv::init()`

- install `renv` \> 0.8.3-4 into default `.libPaths()` if not
already installed
- install `renv` \> 0.8.3-4 into default `.libPaths()` if not
already installed

4. run `pkgr install` in terminal within package directory

Expand Down
2 changes: 1 addition & 1 deletion man/skip_vdiffr.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkgr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Packages:

Repos:
- CRAN: https://cran.rstudio.com # used for most things
- MPN: https://mpn.metworx.com/snapshots/stable/2023-08-24 # used for specific Metrum packages (such as pmtables & yspec)
- MPN: https://mpn.metworx.com/snapshots/stable/2024-06-12

Lockfile:
Type: renv
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion tests/testthat/_snaps/base-plot/full-test-big.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion tests/testthat/_snaps/base-plot/full-test-small.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion tests/testthat/_snaps/base-plot/full-test.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion tests/testthat/_snaps/base-plot/no-group-level.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion tests/testthat/_snaps/base-plot/numeric-group-level.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion tests/testthat/_snaps/base-plot/test-metagroup.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion tests/testthat/_snaps/nsim-plot/multiple-simulations.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 71e8e91

Please sign in to comment.