Skip to content

Commit

Permalink
Run all pre-commit hooks on pull requests (#236)
Browse files Browse the repository at this point in the history
Help to ensure new code contributions meet the coding standards of the
project.
  • Loading branch information
jdufresne authored Sep 6, 2021
1 parent ca0b08f commit 5c73bfc
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
13 changes: 12 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,19 @@ name: Python package
on: [push, pull_request]

jobs:
build:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
- name: Install dependencies
run: python -m pip install pre-commit
- name: Run pre-commit
run: pre-commit run --all-files

build:
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ repos:
rev: 21.8b0
hooks:
- id: black
language_version: python3.6
args: ["--target-version", "py36"]
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ def readme():
license="LGPL",
keywords=["encoding", "i18n", "xml"],
project_urls={
'Documentation': 'https://chardet.readthedocs.io/',
'GitHub Project': 'https://github.com/chardet/chardet',
'Issue Tracker': 'https://github.com/chardet/chardet/issues'
},
"Documentation": "https://chardet.readthedocs.io/",
"GitHub Project": "https://github.com/chardet/chardet",
"Issue Tracker": "https://github.com/chardet/chardet/issues",
},
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
Expand Down

0 comments on commit 5c73bfc

Please sign in to comment.