-
Notifications
You must be signed in to change notification settings - Fork 772
92 lines (78 loc) · 2.75 KB
/
test.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: Test
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_call:
permissions: read-all
jobs:
pre-commit:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
- uses: actions/setup-python@75f3110429a8c05be0e1bf360334e4cced2b63fa # v2.3.3
- uses: pre-commit/action@9b88afc9cd57fd75b655d5c71bd38146d07135fe # v2.0.3
Python:
name: core / Python ${{ matrix.ver }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
ver: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
include:
- os: macos-latest
ver: "3.13"
- os: macos-latest
ver: "3.12"
- os: macos-latest
ver: "3.11"
- os: macos-latest
ver: "3.10"
steps:
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
- name: Set up Python
uses: actions/setup-python@75f3110429a8c05be0e1bf360334e4cced2b63fa # v2.3.3
with:
python-version: ${{ matrix.ver }}
env:
PIP_TRUSTED_HOST: "pypi.python.org pypi.org files.pythonhosted.org"
- name: Install Python ${{ matrix.ver }} dependencies
run: |
python3 -m pip install --upgrade pip setuptools
python3 -m pip install tox numpy
- name: Execute Python tests
run: tox
R:
name: core / R ${{ matrix.ver }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
ver: ['4.4']
steps:
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
- name: Set up ${{ matrix.ver }}
uses: r-lib/actions/setup-r@33f03a860e4659235eb60a4d87ebc0b2ea65f722 # v2.4.0
with:
r-version: ${{ matrix.ver }}
- name: Install R ${{ matrix.ver }} system dependencies
if: matrix.os == 'ubuntu-20.04'
run: sudo apt-get update; sudo apt-get install -y libcurl4-openssl-dev qpdf libgit2-dev libharfbuzz-dev libfribidi-dev
- name: Install R ${{ matrix.ver }} Rlang dependencies
run: |
python3 -m venv path/to/venv
source path/to/venv/bin/activate
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
run: |
cd R/tests
Rscript run_tests.R