-
Notifications
You must be signed in to change notification settings - Fork 4
40 lines (33 loc) · 1.02 KB
/
ci-testing.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
38
39
40
name: CI testing
# see: https://help.github.com/en/actions/reference/events-that-trigger-workflows
on:
# Trigger the workflow on push or pull request, but only for the master branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
pytest:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macOS-latest ]
python-version: [ 3.9 ]
# Timeout: https://stackoverflow.com/a/59076067/4521646
timeout-minutes: 15
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 dependencies
run: |
pip --version
pip install -r requirements.txt -r tests/requirements.txt \
-f https://download.pytorch.org/whl/cpu/torch_stable.html
pip list
shell: bash
- name: Tests
run: python -m pytest tests/ -v