Skip to content

Commit

Permalink
ci: switch to GitHub Actions
Browse files Browse the repository at this point in the history
 - coverage display wasn't set up before, so leaving that alone in the readme for now
  • Loading branch information
barrettk committed Aug 7, 2024
1 parent 37eb86b commit b57855d
Show file tree
Hide file tree
Showing 6 changed files with 106 additions and 126 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.

28 changes: 28 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: coverage
on:
push:
branches:
- 'main'
- 'scratch/**'
pull_request:

jobs:
coverage:
runs-on: ubuntu-latest
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::covr
upgrade: 'TRUE'
- name: Run covr
shell: Rscript {0}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: covr::codecov()
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
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +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)
[![Build Status](https://github.com/metrumresearchgroup/pmforest/actions/workflows/main.yaml/badge.svg)](https://github.com/metrumresearchgroup/pmforest/actions/workflows/main.yaml)
[![codecov](https://codecov.io/gh/metrumresearchgroup/pmforest/branch/main/graph/badge.svg)](https://codecov.io/gh/metrumresearchgroup/pmforest)
<!-- badges: end -->

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

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

Expand All @@ -35,13 +35,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 +56,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

0 comments on commit b57855d

Please sign in to comment.