Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#80)
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: Serkan Hosca <serkan@hosca.com>
  • Loading branch information
pre-commit-ci[bot] and shosca committed Jun 15, 2022
1 parent d5ff741 commit 1f42c3b
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
name: Build

on:
pull_request:
push:
branches:
- master
pull_request:
workflow_dispatch:

jobs:
build:
Expand All @@ -24,6 +23,8 @@ jobs:
strategy:
matrix:
container:
- image: python:latest
toxenv: lint
- image: python:3.6
toxenv: py36-sqla12
- image: python:3.6
Expand Down Expand Up @@ -76,6 +77,7 @@ jobs:
env:
DATABASE_URL: postgresql://postgres:postgres@postgres
- name: Upload Coverage
if: "!startsWith('lint', matrix.container.toxenv)"
run: coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ repos:
language_version: python3

- repo: https://github.com/asottile/pyupgrade
rev: v2.32.1
rev: v2.34.0
hooks:
- id: pyupgrade
args: [--py3-plus]
Expand All @@ -41,7 +41,7 @@ repos:
- id: check-manifest

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
rev: v4.3.0
hooks:
- id: check-added-large-files
- id: check-builtin-literals
Expand Down
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ clean-test: ## remove test and coverage artifacts
resetdb: $(RESETDBS)

lint: ## run pre-commit hooks on all files
-if python -c "import sys; exit(1) if (sys.version_info.major, sys.version_info.minor) < (3, 7) else exit(0)"; then \
pre-commit run --all-files ; \
fi
pre-commit run --all-files

coverage: ## check code coverage quickly with the default Python
py.test $(PYTEST_OPTS) \
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ services:
- pg
environment:
- DATABASE_URL=postgresql://postgres:postgres@pg
- TOX_WORK_DIR=/tmp/tox
volumes:
- .:/code
- /tmp:/root/.cache
9 changes: 8 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[tox]
toxworkdir={env:TOX_WORK_DIR:.tox}
skipsdist = true
envlist =
lint
pypy36-{drf38,drf39,drf310}-{sqla12,sqla13,sqla14}-{dj11,dj20,dj21,dj22}-

py36-{sqla12,sqla13,sqla14}-{ drf38}-{dj11,dj20,dj21,dj22 }
Expand Down Expand Up @@ -77,4 +79,9 @@ whitelist_externals =
commands =
pip freeze
make resetdb
make -j lint coverage
make coverage

[testenv:lint]
basepython = python3.10
commands =
make lint

0 comments on commit 1f42c3b

Please sign in to comment.