Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spatiotemporal exposures and toxicology patch 2 #71

Closed
Closed
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/codecov.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: R Package CI

on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up R
uses: r-lib/actions/setup-r@v2
with:
r-version: 4.1 # You can change this to the R version you need

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libudunits2-dev libgdal-dev


- name: Install dependencies
run: |
R -e 'install.packages("remotes")'
R -e 'remotes::install_deps()'

- name: Install dependencies for covr and testthat
run: R -e 'install.packages(c("covr", "testthat"), dependencies = TRUE)'


- name: Run tests and calculate coverage
run: |
R -e 'library(covr); covr::package_coverage()'

- name: Upload coverage to Codecov
run: |
echo "CODECOV_TOKEN: $CODE_COV"
R -e 'library(covr); covr::codecov(token = Sys.getenv("CODE_COV"))'
env:
CODECOV_TOKEN: ${{ secrets.CODE_COV }}



- name: Cleanup
run: |
R -e 'remove.packages("remotes")'
Loading