-
Notifications
You must be signed in to change notification settings - Fork 33
39 lines (30 loc) · 973 Bytes
/
CI.yaml
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
name: Pull-request CI
on: push
jobs:
run-tests:
name: Run tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
python-version: [3.8, 3.9, '3.10', 3.11]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.3.2
- run: poetry install --with dev --all-extras
- name: Install pytorch CPU for ubuntu-latest
run: poetry run pip uninstall -y torch torchvision; poetry run pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu
if: matrix.os == 'ubuntu-latest'
- run: poetry run black --check .
- run: poetry run mypy .
- run: poetry run pytest --cov