-
Notifications
You must be signed in to change notification settings - Fork 1
31 lines (28 loc) · 923 Bytes
/
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
# This workflow will install PyTorch for CPU and other Python dependencies and run unit tests and test for
# basic commands that are marked as "not slow" (in both cases).
name: tests
on:
pull_request: {}
push:
branches: main
tags: "*"
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: show previous workflow conclusion
run: echo ${{ github.event.workflow_run.conclusion }}
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: "3.9"
cache: "pip"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install torch --extra-index-url https://download.pytorch.org/whl/cpu
pip install -r requirements.txt
- name: Run tests with coverage
run: |
pytest -k "not slow" --cov --cov-report term-missing