Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use reusable pre-commit workflow #188

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 3 additions & 17 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,9 @@ on:

jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9']
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install -U pip setuptools wheel
pip install -r ./requirements.txt

- name: Run pre-commit
run: pre-commit install && pre-commit run --all-files
uses: less-action/reusables/.github/workflows/pre-commit.yaml@v1
antonagestam marked this conversation as resolved.
Show resolved Hide resolved
with:
python-version: '3.9'

test:
runs-on: ubuntu-latest
Expand Down
20 changes: 14 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,20 @@ repos:
rev: 3.9.2
hooks:
- id: flake8
- repo: local
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.931
hooks:
- id: mypy
name: mypy
entry: mypy
language: system
types: [ python ]
exclude: "scripts/*"
args: [ "--cache-dir=/dev/null", "--no-incremental" ]
exclude: "scripts/*"
additional_dependencies:
- pytest
- djangorestframework
- types-pytz
- django-stubs
antonagestam marked this conversation as resolved.
Show resolved Hide resolved
- typing-extensions
- requests
- coreapi
- types-requests
- types-PyYAML
- types-Markdown