-
Notifications
You must be signed in to change notification settings - Fork 761
45 lines (40 loc) · 1.37 KB
/
tests-r.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
name: R Tests
on: [push, pull_request]
jobs:
test:
strategy:
max-parallel: 4
fail-fast: false
matrix:
python-version: ['3.11']
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'pr:test-r')
steps:
- uses: actions/checkout@v3
- name: Set up R
uses: r-lib/actions/setup-r@v2
with:
r-version: '4.2.3'
- name: Install R dependencies
run: |
wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | sudo tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc
sudo add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/"
sudo apt-get install -y \
libcairo-dev \
libedit-dev \
libnlopt-dev \
libxml2-dev \
libcurl4-openssl-dev
Rscript -e 'install.packages(c("forecast", "nnfor", "hts"), repos="https://cloud.r-project.org")'
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
run: |
pip install . \
-r requirements/requirements-test.txt \
-r requirements/requirements-extras-r.txt
- name: Test with pytest
run: |
pytest -n2 test/ext/r_forecast