Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
templates
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tecnalia_robotics-public
templates
Commits
470bc229
Commit
470bc229
authored
2 years ago
by
Jon Azpiazu
Browse files
Options
Downloads
Patches
Plain Diff
New jobs to substitute the old Python check
parent
c24b225c
No related branches found
Branches containing commit
No related tags found
1 merge request
!80
Resolve "python_syntax is python2 only"
Pipeline
#79530
passed
2 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ci-templates/syntax-check.yml
+36
-9
36 additions, 9 deletions
ci-templates/syntax-check.yml
with
36 additions
and
9 deletions
ci-templates/syntax-check.yml
+
36
−
9
View file @
470bc229
...
...
@@ -16,16 +16,43 @@ clang_format:
when
:
always
##########################################################
## Simple check for basic Python syntax errors; this is much less thorough than
## other options like pylint, but much faster and less strict
## Several Python checks
##########################################################
python_syntax
:
image
:
alpine:3.15
# python2 is no longer available in alpine:3.16
before_script
:
-
apk add --update python2
stage
:
build
script
:
python -m compileall -q .
when
:
always
flake8
:
stage
:
.post
image
:
python:3-alpine
before_script
:
-
pip3 install flake8
script
:
-
flake8 --max-line-length 120 --statistics --show-source .
tags
:
-
docker
when
:
always
flake8_extended
:
stage
:
.post
image
:
python:3-alpine
before_script
:
-
pip3 install flake8 flake8-isort flake8-builtins flake8-eradicate flake8-functions-names flake8-return flake8-functions
script
:
-
flake8 --max-line-length 120 --statistics --show-source .
tags
:
-
docker
when
:
always
allow_failure
:
true
python_security
:
stage
:
.post
image
:
python:3-alpine
before_script
:
-
pip3 install bandit safety
script
:
-
bandit -r . || RET=1
-
safety check || RET=1
-
exit $RET
tags
:
-
docker
when
:
always
##########################################################
## Check for errors in bash/sh scripts
...
...
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