Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
rabbitmq_agents
Manage
Activity
Members
Labels
Plan
Issues
16
Issue boards
Milestones
Wiki
Code
Merge requests
10
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
rc
rabbitmq_agents
Commits
a33f1426
Commit
a33f1426
authored
4 years ago
by
Bo-Chun Chen
Browse files
Options
Downloads
Patches
Plain Diff
Add github action for python lint
parent
c427a7c8
No related branches found
No related tags found
3 merge requests
!147
Merge previous default branch feat-cod-rmq into main
,
!98
Feat GitHub action
,
!94
WIP: Merge feat_prod_rmq with feat_cod_rmq
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.github/workflows/python-ling.yaml
+29
-0
29 additions, 0 deletions
.github/workflows/python-ling.yaml
with
29 additions
and
0 deletions
.github/workflows/python-ling.yaml
0 → 100644
+
29
−
0
View file @
a33f1426
name
:
Python linting
on
:
[
push
,
pull_request
]
jobs
:
build
:
runs-on
:
ubuntu-latest
steps
:
-
uses
:
actions/checkout@v2
-
name
:
Set up Python
3.6
uses
:
actions/setup-python@v2
with
:
# Semantic version range syntax or exact version of a Python version
python-version
:
'
3.6'
# Optional - x64 or x86 architecture, defaults to x64
architecture
:
'
x64'
-
name
:
Install dependencies
run
:
|
python -m pip install --upgrade pip
pip install flake8
#if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
-
name
:
Lint with flake8
run
:
|
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment