-
Notifications
You must be signed in to change notification settings - Fork 122
56 lines (54 loc) · 1.62 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
49
50
51
52
53
54
55
56
name: CI
on: [push, pull_request]
jobs:
test_and_lint:
name: Test and lint
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.8', '3.9', '3.10', '3.11']
pytorch-toolbelt-version: [tests]
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Update pip
run: python -m pip install --upgrade pip
- name: Install PyTorch
run: pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu
- name: Install dependencies
run: pip install .[${{ matrix.pytorch-toolbelt-version }}]
- name: Install linters
run: pip install flake8==5
- name: Run PyTest
run: pytest
- name: Run Flake8
run: flake8
# - name: Install MyPy
# run: pip install mypy==0.800
# - name: Run mypy
# run: mypy .
check_code_formatting:
name: Check code formatting with Black
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Update pip
run: python -m pip install --upgrade pip
- name: Install Black
run: pip install black==23.7.0
- name: Run Black
run: black --config=pyproject.toml --check .