-
Notifications
You must be signed in to change notification settings - Fork 4
39 lines (38 loc) · 1.41 KB
/
unittests_gym_py.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
name: Unittests [python, R]
on: [pull_request, push]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Clone required data
run: |
cd ~/work
git clone https://github.com/slds-lmu/yahpo_data.git
- name: Prepare [python]
run: |
cd ~/work/yahpo_gym/yahpo_gym/yahpo_gym
pip install -e .[test]
printf "data_path: ~/work/yahpo_data\n" >> ~/.config/yahpo_gym
- name: Run yahpo_gym tests [python]
run: |
pytest -sv yahpo_gym/tests/
- name: "Prepare [R]"
run: |
cd ~/work/yahpo_gym/yahpo_gym/yahpo_gym_r
sudo apt install libcurl4-openssl-dev libgit2-dev libharfbuzz-dev libfribidi-dev
Rscript -e "if (!requireNamespace('remotes')) install.packages('remotes', type = 'source')"
Rscript -e "if (getRversion() < '3.2' && !requireNamespace('curl')) install.packages('curl', type = 'source')"
Rscript -e "install.packages('devtools')"
Rscript -e "install.packages('reticulate')"
Rscript -e "remotes::install_local()"
- name: Run yahpo_gym tests [R]
run: |
cd ~/work/yahpo_gym/yahpo_gym/yahpo_gym_r
echo "RETICULATE_PYTHON = $(which python)" >> ~/.Renviron
Rscript -e "devtools::test()"