-
Notifications
You must be signed in to change notification settings - Fork 458
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add github actions workflow to build package and run tests. * update Description file * rename .Rproj file. * Consolidate 'create' functions into one file. * Add tests for create functions. * update description * removed spaces in file and folder names. Regenerated ddl output. Tried to fix Field_Level.csv file. * consolidate write functions into one file. Add execute function. * update docs * add tests for write and execute functions * update documentation * Add windows and linux runners in github actions. * update github actions * download drivers before running tests * fix small error in setup test file. * debug github actions * debug github actions * debug github actions * debug github actions * fix tiny bug * comment out execute ddl test * fix bug in test * Add execute test back in * revert accidental change in description * add print statement for debugging schema error on github actions. * Fix schema environment variable name * Add comment to github actions workflow file. * remove placeholder text in function documentation. * Rename createdDdl.R to createDdl.R * Hack-a-thon updates Closes #81, #387, #239, #412, #391, #330, #408, #365, #306, #264 * Changed bigint to integer for consistency * Updated DDLs * Add tests for redshift. Clean up test setup file. * Foreign key fixes * Add imports and update docs. * Fix bug in setup test script. * update setup file * Add tests for oracle and sql server. Move setup.R file. * fix bug in setup * debug tests on github * debug github actions * debug actions. * debug actions * debug actions. * Add missing secrets to yaml!! * debug actions * test connection on all platforms * add ddl execution * add windows and linux runners * Allow user to specify output location in buildRelease * replace outputpath with outputfolder for consitent argument names in the package. * Add test for buildRelease. * replace outputpath with outputfolder for consistency. update documentation. * move ddl folder to inst so it is accessible from tests * update documentation Co-authored-by: Adam Black <[email protected]> Co-authored-by: Clair Blacketer <[email protected]>
- Loading branch information
1 parent
532be98
commit 40e2698
Showing
73 changed files
with
115 additions
and
68 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
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
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
test_that("buildRelease() output matches current ddl folder", { | ||
|
||
tempfolder <- tempdir(check = TRUE) | ||
generatedBaseFolder <- file.path(tempdir(check = TRUE), "ddl") | ||
currentBaseFolder <- system.file("ddl", package = "CommonDataModel", mustWork = TRUE) | ||
|
||
# build all of the releases in a temp folder | ||
buildRelease(outputfolder = generatedBaseFolder) | ||
|
||
# compare to the files in the current ddl folder of the package | ||
generatedDirectories <- list.dirs(generatedBaseFolder, full.names = F) | ||
currentDirectories <- list.dirs(currentBaseFolder, full.names = F) | ||
expect_gt(length(currentDirectories), 1) | ||
expect_setequal(generatedDirectories, currentDirectories) | ||
|
||
# compare filenames | ||
generatedFilenames <- list.files(generatedBaseFolder, recursive = TRUE) | ||
currentFilenames <- list.files(generatedBaseFolder, recursive = TRUE) | ||
expect_gt(length(currentFilenames), 1) | ||
expect_setequal(generatedFilenames, currentFilenames) | ||
|
||
# compare file contents using md5 hash | ||
generatedChecksums <- tools::md5sum(file.path(generatedBaseFolder, generatedFilenames)) | ||
currentChecksums <- tools::md5sum(file.path(currentBaseFolder, currentFilenames)) | ||
names(generatedChecksums) <- NULL | ||
names(currentChecksums) <- NULL | ||
expect_gt(length(currentChecksums), 1) | ||
expect_setequal(generatedChecksums, currentChecksums) | ||
|
||
}) |
Oops, something went wrong.