33 lines (29 loc) · 975 Bytes
/
linting.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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: GPyTorch Linting
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.6"
- name: Install dependencies
run: |
pip install flake8==4.0.1 flake8-print==4.0.0 pre-commit
pre-commit install
pre-commit run seed-isort-config || true
- name: Run linting
run: |
flake8
- name: Run pre-commit checks
# skipping flake8 here (run separatey above b/c pre-commit does not include flake8-print)
run: |
SKIP=flake8 pre-commit run --files test/**/*.py gpytorch/**/*.py