forked from Netflix/metaflow
-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (60 loc) · 1.91 KB
/
test.yml
File metadata and controls
70 lines (60 loc) · 1.91 KB
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
name: Test
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
name: ${{ matrix.lang }} tests on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
lang: [Python, R]
steps:
- uses: actions/checkout@v2
- name: Set up Python 2.x
if: matrix.lang == 'Python'
uses: actions/setup-python@v1
with:
python-version: '2.x'
- name: Install Python 2.x dependencies
if: matrix.lang == 'Python'
run: |
python2 -m pip install --upgrade pip
python2 -m pip install tox
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Install Python 3.x dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install tox numpy
- name: Set up R 3.6
if: matrix.lang == 'R'
uses: r-lib/actions/setup-r@v1
with:
r-version: '3.6.3'
- name: Install R 3.6 system dependencies
if: matrix.lang == 'R' && matrix.os == 'ubuntu-latest'
run: sudo apt-get update; sudo apt-get install -y libcurl4-openssl-dev qpdf libgit2-dev
- name: Install R 3.6 Rlang dependencies
if: matrix.lang == 'R'
run: |
python3 -m pip install .
Rscript -e 'install.packages("devtools", repos="https://cloud.r-project.org", Ncpus=8)'
Rscript -e 'devtools::install_deps("R", dependencies=TRUE, repos="https://cloud.r-project.org", upgrade="default")'
R CMD INSTALL R
Rscript -e 'install.packages(c("data.table", "caret", "glmnet", "Matrix", "rjson"), repos="https://cloud.r-project.org", Ncpus=8)'
- name: Execute R tests
if: matrix.lang == 'R'
run: |
cd R/tests
Rscript run_tests.R
- name: Execute Python tests
if: matrix.lang == 'python'
run: tox