-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into repo-status
- Loading branch information
Showing
11 changed files
with
99 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
^\.Rproj\.user$ | ||
^assets$ | ||
^README\.Rmd$ | ||
^\.github$ |
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# These owners will be the default owners for everything in | ||
# the repo. Unless a later match takes precedence, | ||
# @jdhoffa will be requested for review when someone opens | ||
# a pull request. | ||
* @jdhoffa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
# This example file will enable R language checks on push or PR to the main | ||
# branch. | ||
# It will also run the checks every weeknight at midnight UTC | ||
# | ||
# Note the @main in `uses:` on the last line. This will call the latest version | ||
# of the workflow from the `main` brnach in the RMI-PACTA/actions repo. You can | ||
# also specify a tag from that repo, or a commit SHA to pin action versions. | ||
on: | ||
pull_request: | ||
push: | ||
branches: [main] | ||
schedule: | ||
- cron: '0 0 * * 1,2,3,4,5' | ||
workflow_dispatch: | ||
|
||
name: R | ||
|
||
jobs: | ||
R-package: | ||
name: R Package Checks | ||
uses: RMI-PACTA/actions/.github/workflows/R.yml@main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# Generated by roxygen2: do not edit by hand | ||
|
||
export(generate_package_table) | ||
importFrom(rlang,.data) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#' @importFrom rlang .data | ||
NULL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,20 @@ | ||
test_that("multiplication works", { | ||
expect_identical(2L * 2L, 4L) | ||
library(testthat) | ||
Check warning on line 1 in tests/testthat/test-generate_package_table.R GitHub Actions / R Package Checks / lintr / lint
|
||
library(dplyr) | ||
Check warning on line 2 in tests/testthat/test-generate_package_table.R GitHub Actions / R Package Checks / lintr / lint
|
||
|
||
pacta_r_package_path <- "https://github.com/RMI-PACTA/pacta.r.package" | ||
|
||
test_that("returns correct structure and data", { | ||
result <- generate_package_table(pacta_r_package_path) | ||
expected_names <- c("Repo", "Lifecycle", "Status", "Latest_SHA", "Maintainer") | ||
|
||
expect_true(tibble::is_tibble(result)) | ||
expect_equal(ncol(result), 5) | ||
expect_true(all(expected_names %in% names(result))) | ||
}) | ||
|
||
test_that("handles empty input", { | ||
empty_input <- character(0) | ||
result <- generate_package_table(empty_input) | ||
|
||
expect_true(tibble::is_tibble(result) && nrow(result) == 0) | ||
}) |