File tree Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Original file line number Diff line number Diff line change
1
+ # This is a basic workflow to help you get started with Actions
2
+
3
+ name : pre-commit
4
+
5
+ # Controls when the workflow will run
6
+ on :
7
+ # Triggers the workflow pull request events but only for the master branch
8
+ pull_request :
9
+ push :
10
+ branches : [master]
11
+
12
+ # Allows you to run this workflow manually from the Actions tab
13
+ workflow_dispatch :
14
+
15
+ # A workflow run is made up of one or more jobs that can run sequentially or in parallel
16
+ jobs :
17
+ # Using Ubuntu image with latest tag
18
+ pre-commit :
19
+ runs-on : ubuntu-latest
20
+
21
+ # Steps represent a sequence of tasks that will be executed as part of the job
22
+ steps :
23
+ - uses : actions/checkout@v3
24
+ # setting up Python v3.0.0
25
+ - uses : actions/setup-python@v3.0.0
26
+ # using pre-commit latest i.e v2.0.3
27
+ - uses : pre-commit/action@v2.0.3
28
+ # Running pre-commit for all files
29
+ - name : Pre-Commit-Run
30
+ run : |
31
+ pip install pre-commit
32
+ pre-commit run --all-files
Original file line number Diff line number Diff line change
1
+ default_stages : [commit, push]
2
+ default_language_version :
3
+ python : python3.8
4
+ repos :
5
+ - repo : https://github.com/PyCQA/flake8
6
+ rev : 3.8.2
7
+ hooks :
8
+ - id : flake8
9
+ args : [
10
+ --max-line-length=100
11
+ ]
12
+ exclude : ^(venv/|docs/)
13
+ types : ['python']
You can’t perform that action at this time.
0 commit comments