Improvements for consistency #462
Workflow file for this run
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: unit-tests | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
- dev | |
pull_request: | |
branches: | |
- main | |
- dev | |
jobs: | |
unit-tests: | |
runs-on: ubuntu-20.04 | |
container: | |
image: hopkinsidd/flepimop:latest-dev | |
options: --user root | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
lfs: true | |
- name: Set up Rprofile | |
run: | | |
cp build/docker/Docker.Rprofile $HOME/.Rprofile | |
cp /home/app/.bashrc $HOME/.bashrc | |
shell: bash | |
- name: Install the gempyor package | |
run: | | |
source /var/python/3.10/virtualenv/bin/activate | |
python -m pip install --upgrade pip | |
python -m pip install "flepimop/gempyor_pkg[test]" | |
shell: bash | |
- name: Install local R packages | |
run: Rscript build/local_install.R | |
shell: bash | |
- name: Run gempyor tests | |
run: | | |
source /var/python/3.10/virtualenv/bin/activate | |
cd flepimop/gempyor_pkg | |
pytest -s | |
shell: bash | |
- name: Run flepicommon tests | |
run: | | |
setwd("flepimop/R_packages/flepicommon") | |
devtools::test(stop_on_failure=TRUE) | |
shell: Rscript {0} | |
- name: Run inference tests | |
run: | | |
setwd("flepimop/R_packages/inference") | |
devtools::test(stop_on_failure=TRUE) | |
shell: Rscript {0} | |
# - name: Run integration tests | |
# env: | |
# CENSUS_API_KEY: ${{ secrets.CENSUS_API_KEY }} | |
# run: | | |
# Rscript build/local_install.R | |
# cd test | |
# source /var/python/3.10/virtualenv/bin/activate | |
# pytest run_tests.py | |
# shell: bash |