-
-
Notifications
You must be signed in to change notification settings - Fork 553
47 lines (38 loc) · 1.16 KB
/
unit-tests.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
name: unit-tests
on:
pull_request:
branches:
- "*"
push:
branches:
- main
jobs:
run:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.13", "3.12", "3.11", "3.10"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Build River
uses: ./.github/actions/install-env
with:
python-version: ${{ matrix.python-version }}
- name: Cache River datasets
uses: actions/cache@v4
with:
path: ~/river_data
key: ${{ runner.os }}
- name: Cache scikit-learn datasets
uses: actions/cache@v4
with:
path: ~/scikit_learn_data
key: ${{ runner.os }}
- name: Download datasets
run: |
poetry run python -c "from river import datasets; datasets.CreditCard().download(); datasets.Elec2().download(); datasets.SMSSpam().download()"
poetry run python -c "from river import bandit; bandit.datasets.NewsArticles().download()"
- name: pytest
run: |
poetry run pytest -m "not datasets" --durations=10 -n logical # Run pytest on all logical CPU cores