-
Notifications
You must be signed in to change notification settings - Fork 9
37 lines (31 loc) · 875 Bytes
/
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
name: Test
on:
push:
pull_request:
types: [opened, synchronize]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install CPU PyTorch
run: pip3 install torch==2.3.0 --index-url https://download.pytorch.org/whl/cpu
- name: Install test dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[tests]
- name: Check code style
run: ruff check .
- name: Test
run: pytest
- name: Upload coverage
uses: codecov/codecov-action@v4