-
Notifications
You must be signed in to change notification settings - Fork 34
31 lines (28 loc) · 1.09 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
name: Tests
on: [push, pull_request, workflow_dispatch]
jobs:
test:
name: Tests
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install PyTorch
run: python3 -m pip install torch --index-url https://download.pytorch.org/whl/cpu
# this used to work but for some reason fails with "No module named 'torch'", despite it being available
# fixed by installing with setup.py develop and installing the test requirements manually
# - name: Install Dependencies
# run: python3 -m pip install -e .[testing]
- name: Install Package
run: python3 setup.py develop
- name: Install Dependencies
run: python -m pip install pytest git+https://github.com/google-research/fast-soft-sort.git@6a52ce79869ab16e1e0f39149a84f50f8ad648c5
- name: Run Pytest
run: python3 -m pytest -s -v