Skip to content

Merge pull request #600 from HopkinsIDD/dev_manuscript_fig5_fix #2130

Merge pull request #600 from HopkinsIDD/dev_manuscript_fig5_fix

Merge pull request #600 from HopkinsIDD/dev_manuscript_fig5_fix #2130

Workflow file for this run

name: unit-tests
on:
push:
branches:
- master
- dev
pull_request:
branches:
- master
- dev
jobs:
unit-tests:
runs-on: ubuntu-20.04
container:
image: docker://hopkinsidd/choleramappingpipeline:latest-dev
options: --user root
steps:
- name: Remove unnecessary files
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Checkout
uses: actions/checkout@v3
- name: Checkout Layers
uses: actions/checkout@v3
with:
repository: HopkinsIDD/cholera-covariates
ref: for_testing
path: Layers/
lfs: true
token: ${{ secrets.PERSONAL_TOKEN }}
- name: Set up Rprofile
run: cp Docker.Rprofile $HOME/.Rprofile
shell: bash
- name: Run taxdat tests
run: |
setwd("packages/taxdat")
devtools::test(stop_on_failure=TRUE)
shell: Rscript {0}
- name: Ingest Covariates
run: |
service postgresql start
bash grant_cholera_database.sh root
export USER=root
Rscript -e "install.packages('packages/taxdat',type='source',repos=NULL)"
pwd
Rscript Analysis/R/prepare_grid_cmd.R -d ./ -u root -r 1 -i TRUE -a KEN
Rscript Analysis/R/prepare_grid_cmd.R -d ./ -u root -r 20 -i TRUE -a KEN
Rscript Analysis/R/prepare_covariates_cmd.R -d ./Layers -u root -r 1 -t '1 years' -i TRUE -p FALSE -n 1 -o FALSE -x TRUE -m TRUE -c p -g 'public.grid_1_1' -a KEN
Rscript Analysis/R/prepare_covariates_cmd.R -d ./Layers -u root -r 20 -t '1 years' -i TRUE -p FALSE -n 1 -o FALSE -x FALSE -m TRUE -c p,dw -g 'public.grid_20_20' -a KEN
shell: bash
- name: Run integration tests
env:
CHOLERA_API_USERNAME: ${{ secrets.CHOLERA_API_USERNAME }}
CHOLERA_API_KEY: ${{ secrets.CHOLERA_API_KEY }}
run: |
service postgresql start
bash grant_cholera_database.sh root
export USER=root
Rscript -e "install.packages('packages/taxdat',type='source',repos=NULL)"
pwd
cd test
export PRODUCTION_RUN=FALSE
Rscript run_tests.R
shell: bash