-
Notifications
You must be signed in to change notification settings - Fork 4
64 lines (62 loc) · 1.7 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
name: unit-tests
on:
workflow_dispatch:
push:
branches:
- main
- dev
pull_request:
branches:
- main
- dev
- breaking-improvments
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