-
Notifications
You must be signed in to change notification settings - Fork 4
46 lines (36 loc) · 1.05 KB
/
ci.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
41
42
43
44
45
46
name: "CI Build & Test"
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- 3.7
- 3.9
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python -
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install Dependencies
run: |
poetry install
# Use a specific version of setuptools because of a bug in PyTorch https://stackoverflow.com/a/70520199/1226799. It should be resolved already but PyTorch hasn't updated yet.
poetry run pip install setuptools=='59.5.0'
- name: Lint
run: |
poetry run yapf --diff --parallel --recursive .
- name: Test
run: |
poetry run pytest -m 'not slow'
if: success() || failure()