Skip to content

Commit

Permalink
Merge pull request #141 from Spatiotemporal-Exposures-and-Toxicology/…
Browse files Browse the repository at this point in the history
…SET-self-hosted-actions-01

Update test-coverage.yaml
  • Loading branch information
kyle-messier authored Oct 6, 2023
2 parents f45aee9 + 66e6a2d commit e92b6bc
Show file tree
Hide file tree
Showing 13 changed files with 174 additions and 40 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
^R/join_point_receptor_to_polygon_source\\.r$ # Add this line
^\.Rproj\.user$
^\.github$
^LICENSE\.md$
32 changes: 5 additions & 27 deletions .github/workflows/check-standard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,37 +10,15 @@ name: R-CMD-check

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

runs-on: self-hosted
strategy:
fail-fast: false
matrix:
config:
- {os: ubuntu-latest, r: 'release'}


runner-os: [linux-rocky8] # Specify the desired runner OS here
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v3

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

- 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@v2
with:
extra-packages: any::rcmdcheck
needs: check
- uses: actions/checkout@v2 # Update to the latest version of the 'actions/checkout' action

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
- name: Check R Package
uses: r-lib/actions/check-r-package@v2
11 changes: 1 addition & 10 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,14 @@ name: test-coverage

jobs:
test-coverage:
runs-on: ubuntu-latest
runs-on: self-hosted
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} # Add this line

steps:
- uses: actions/checkout@v3

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

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

- name: Test coverage
run: |
covr::codecov(
Expand Down
5 changes: 2 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@ Authors@R:
family = "Messier",
role = c("aut", "cre"),
email = "[email protected]"))
Description: This will one day be a package that provides near real time air pollution data
Description: Near Real Time air pollution model results and code produced by the SET group. It is fully tested, versioned, and open source and open access.
Depends: R (>= 3.5.0)
Imports: dplyr, sf, stats, methods
Suggests: covr, withr, knitr, rmarkdown, testthat (>= 3.0.0), terra, stars, sftime
Encoding: UTF-8
VignetteBuilder: knitr, rmarkdown
RoxygenNote: 7.2.3
Config/testhat/edition: 3
License: GPL-2 | MIT + file LICENSE

License: MIT + file LICENSE
2 changes: 2 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
YEAR: 2023
COPYRIGHT HOLDER: NRTAPmodel authors
21 changes: 21 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# MIT License

Copyright (c) 2023 NRTAPmodel authors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
5 changes: 5 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Generated by roxygen2: do not edit by hand

export(build_pipeline)
export(check_crs_is_valid)
export(check_data_completeness)
export(check_input_raster_in_extent)
export(check_means_are_valid)
export(check_output_locations_are_valid)
export(generic_base_learner)
export(generic_meta_learner)
22 changes: 22 additions & 0 deletions man/check_crs_is_valid.Rd

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

28 changes: 28 additions & 0 deletions man/check_data_completeness.Rd

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

28 changes: 28 additions & 0 deletions man/check_input_raster_in_extent.Rd

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

34 changes: 34 additions & 0 deletions man/check_means_are_valid.Rd

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

22 changes: 22 additions & 0 deletions man/check_output_locations_are_valid.Rd

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

3 changes: 3 additions & 0 deletions tests/testthat/test-check_outputs.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#' list of valid CRS: EPSG:5070, EPSG:4ß326
#'
testthat::test_that("Output CRS is valid", {
skip_on_ci()
withr::local_package("sf")
withr::local_options(list(sf_use_s2 = FALSE))

Expand Down Expand Up @@ -52,6 +53,7 @@ testthat::test_that("Predicted means are within a proper range", {
#' unit testing for the model output is inside the mainland US
#'
testthat::test_that("Output locations are in the mainland US", {
skip_on_ci()
withr::local_package("sf")
withr::local_package("dplyr")
withr::local_options(list(sf_use_s2 = FALSE))
Expand All @@ -74,6 +76,7 @@ testthat::test_that("Output locations are in the mainland US", {
#' unit testing for no NAs in covariates
#'
testthat::test_that("No covariates have NAs", {
skip_on_ci()
withr::local_package("sf")
withr::local_options(list(sf_use_s2 = FALSE))

Expand Down

0 comments on commit e92b6bc

Please sign in to comment.