-
Notifications
You must be signed in to change notification settings - Fork 7
48 lines (38 loc) · 1.13 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
47
48
# This workflow will install Python dependencies, run tests and lint
name: ci
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
core_checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: set up python
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install setuptools wheel
python3 -m pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu
- name: install
run: |
BUILD_NO_CUDA=1 python3 -m pip install --upgrade --upgrade-strategy eager -e .[dev]
python3 -m pip freeze
- name: isort
run: |
python3 -m isort --check src
python3 -m isort --check tests
- name: black
run: |
python3 -m black --check src
python3 -m black --check tests
- name: lint
run: |
python3 -m ruff check src --output-format=github
- name: test
run: python3 -m pytest tests