-
Notifications
You must be signed in to change notification settings - Fork 78
35 lines (30 loc) · 1.18 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
name: Test
on: [push, workflow_dispatch]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
# Python 3.10 is not working due to a bug with numpy
# python-version: [3.7, 3.8, 3.9, "3.10"]
extras:
[
"",
'--extras "gpl"',
'--extras "sklearn"',
'--extras "gpl sklearn"',
]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- uses: Gr1N/setup-poetry@v7
- uses: actions/cache@v2
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.extras }}-poetry-${{ hashFiles('poetry.lock') }}
- name: Install depedencies with all extras combinations
run: poetry install --no-dev ${{ matrix.extras }} && poetry run pip install pytest
- run: poetry run pytest