add custom html #354
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
name: PACE-HRH Integration Tests | |
# This job is used for all non-unit tests | |
on: | |
# todo: we need to decide later if these tests are only run on releases | |
pull_request: | |
branches: | |
- "**" | |
jobs: | |
install: | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
R: [ '4.4' ] | |
defaults: | |
run: | |
working-directory: . | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup R | |
uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: ${{ matrix.R }} | |
- name: Install devtools | |
run: | | |
Rscript -e "options(install.packages.compile.from.source = 'never'); install.packages('devtools')" | |
- name: Install pandoc | |
uses: crazy-max/ghaction-chocolatey@v2 | |
with: | |
args: install pandoc | |
- name: Setup Dependency | |
working-directory: 'tests/setup' | |
run: | | |
Rscript install_dep_for_tests.R | |
- name: Install packages | |
# todo: using Readme instruction to install package | |
run: | | |
Rscript -e "install.packages('httpuv', build = FALSE, type = 'win.binary')" | |
Rscript -e "devtools::install_local('pacehrh', force=TRUE, upgrade='always', repos = NULL, build=TRUE, dependencies=TRUE)" | |
shell: cmd | |
- name: Run Integration tests | |
run: | | |
Rscript -e "testthat::test_dir('tests/testthat/')" | |
if errorlevel 1 echo "::error:: Integration tests failed" && exit 1 | |
shell: cmd | |
continue-on-error: false | |
env: | |
NOT_CRAN: true | |
- name: Check input spreadsheet | |
run: | | |
Rscript -e "rmarkdown::render('config/validation/validation_report.Rmd', 'html_document', params=list(inputFile='config/model_inputs.xlsx', outputDir='log'), output_dir='.')" | |
if errorlevel 1 "::error:: Validate Input failed" && exit 1 | |
shell: cmd | |
continue-on-error: false | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: validation-results | |
path: | | |
log | |
validation_report.html |