提交 8e3e8399 authored 作者: Marco Gorelli's avatar Marco Gorelli 提交者: Brandon T. Willard

fix up pre-commit, run in CI

上级 3aa092fb
......@@ -40,20 +40,9 @@ jobs:
runs-on: ubuntu-latest
if: ${{ needs.changes.outputs.changes == 'true' }}
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -U black flake8 isort
- name: Check the style
run: |
black -t py36 --check theano/ tests/ setup.py conftest.py
isort --check theano/ tests/ setup.py conftest.py
flake8
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: pre-commit/action@v2.0.0
test:
name: "Test py${{ matrix.python-version }}: ${{ matrix.part }}"
......@@ -63,7 +52,7 @@ jobs:
runs-on: ubuntu-latest
if: ${{ needs.changes.outputs.changes == 'true' && needs.style.result == 'success' }}
strategy:
fail-fast: false
fail-fast: true
matrix:
python-version: ["3.6", "3.7"]
fast-compile: [0]
......
exclude: |
(?x)^(
versioneer\.py|
theano/_version\.py|
doc/.*|
bin/.*
)$
repos:
- repo: https://github.com/psf/black
rev: 20.8b1
hooks:
- id: black
language_version: python3
exclude: |
(?x)^(
versioneer\.py|
theano/_version\.py|
doc/.*|
bin/.*
)$
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
hooks:
- id: flake8
exclude: |
(?x)^(
versioneer\.py|
theano/_version\.py|
doc/.*|
bin/.*
)$
- repo: https://github.com/pycqa/isort
rev: 5.5.2
rev: 5.6.4
hooks:
- id: isort
exclude: |
(?x)^(
versioneer\.py|
theano/_version\.py|
doc/.*|
bin/.*
)$
......@@ -18,6 +18,7 @@ per-file-ignores =
tests/gpuarray/test_elemwise.py:E402
tests/gpuarray/test_others.py:E402
tests/gpuarray/test_basic_ops.py:E402
theano/gof/unify.py:F811
exclude =
versioneer.py
doc/
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论