Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#71)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Talley Lambert <talley.lambert@gmail.com>
  • Loading branch information
pre-commit-ci[bot] and tlambert03 committed Dec 29, 2020
1 parent 1efc31b commit bea5f2d
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 38 deletions.
32 changes: 9 additions & 23 deletions .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: tests

on: [push, pull_request]
on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
test:
Expand Down Expand Up @@ -35,30 +41,10 @@ jobs:
if: runner.os == 'Linux'
uses: codecov/codecov-action@v1

qa:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
toxenv: ['lint', 'mypy']
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install tox
run: pip install tox
- name: Test with tox
env:
TOXENV: ${{ matrix.toxenv }}
run: tox


deploy:
needs: [test, qa]
runs-on: ubuntu-latest
if: ${{ github.repository == 'napari/magicgui' && contains(github.ref, 'tags') }}
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.3.0
rev: v3.4.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/timothycrosley/isort
- repo: https://github.com/PyCQA/isort
rev: 5.6.4
hooks:
- id: isort
Expand Down
31 changes: 18 additions & 13 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,6 @@ PLATFORM =
macos-latest: macos
windows-latest: windows

[testenv:lint]
deps =
flake8
flake8-docstrings
black==20.8b1
commands =
flake8 magicgui
black --check magicgui

[testenv:mypy]
deps = mypy
commands = mypy

[testenv]
platform =
macos: darwin
Expand All @@ -43,3 +30,21 @@ extras =
pyside: PySide2
commands =
pytest -v --cov-report=xml --cov=magicgui --basetemp={envtmpdir} {posargs}


[testenv:lint]
skip_install=true
deps =
flake8==3.8.4
isort==5.6.4
black==20.8b1
flake8-docstrings
commands =
flake8 magicgui
black --check magicgui
isort --check magicgui

[testenv:mypy]
skip_install=true
deps = mypy
commands = mypy

0 comments on commit bea5f2d

Please sign in to comment.