forked from zarr-developers/zarr-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pre-commit configuration (zarr-developers#1015)
* flake8 added * Create Pre-commit-hooks.yml
- Loading branch information
1 parent
e381bf7
commit 1dc0352
Showing
2 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: pre-commit | ||
|
||
# Controls when the workflow will run | ||
on: | ||
# Triggers the workflow pull request events but only for the master branch | ||
pull_request: | ||
push: | ||
branches: [master] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# Using Ubuntu image with latest tag | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
- uses: actions/checkout@v3 | ||
#setting up Python v3.0.0 | ||
- uses: actions/[email protected] | ||
#using pre-commit latest i.e v2.0.3 | ||
- uses: pre-commit/[email protected] | ||
#Running pre-commit for all files | ||
- name: Pre-Commit-Run | ||
run: | | ||
pip install pre-commit | ||
pre-commit run --all-files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
default_stages: [commit, push] | ||
default_language_version: | ||
python: python3.8 | ||
repos: | ||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 3.8.2 | ||
hooks: | ||
- id: flake8 | ||
args: [ | ||
--max-line-length=100 | ||
] | ||
exclude: ^(venv/|docs/) | ||
types: ['python'] |