This repository has been archived by the owner on Jul 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 47
72 lines (70 loc) · 1.93 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: unit-tests
on:
push:
branches:
- main
- dev
pull_request:
branches:
- main
- dev
jobs:
unit-tests:
runs-on: ubuntu-20.04
container:
image: hopkinsidd/covidscenariopipeline:latest-dev
options: --user root
steps:
- name: Checkout
uses: actions/checkout@v3
with:
lfs: true
- name: Set up Rprofile
run: |
cp 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 gempyor_pkg/
shell: bash
- name: Install local R packages
run: Rscript local_install.R
shell: bash
- name: Run gempyor tests
run: |
source /var/python/3.10/virtualenv/bin/activate
cd gempyor_pkg
pytest -s
shell: bash
- name: Run covidcommon tests
run: |
setwd("R/pkgs/covidcommon")
devtools::test(stop_on_failure=TRUE)
shell: Rscript {0}
- name: Run hospitalization tests
run: |
setwd("R/pkgs/hospitalization")
devtools::test(stop_on_failure=TRUE)
shell: Rscript {0}
# - name: Run report.generation tests
# run: |
# setwd("R/pkgs/report.generation")
# devtools::test(stop_on_failure=TRUE)
# shell: Rscript {0}
- name: Run inference tests
run: |
setwd("R/pkgs/inference")
devtools::test(stop_on_failure=TRUE)
shell: Rscript {0}
- name: Run integration tests
env:
CENSUS_API_KEY: ${{ secrets.CENSUS_API_KEY }}
run: |
Rscript local_install.R
cd test
source /var/python/3.10/virtualenv/bin/activate
pytest run_tests.py
shell: bash