Skip to content
Snippets Groups Projects
Commit 470bc229 authored by Jon Azpiazu's avatar Jon Azpiazu
Browse files

New jobs to substitute the old Python check

parent c24b225c
Branches
Tags
1 merge request!80Resolve "python_syntax is python2 only"
Pipeline #79530 passed
...@@ -16,15 +16,42 @@ clang_format: ...@@ -16,15 +16,42 @@ clang_format:
when: always when: always
########################################################## ##########################################################
## Simple check for basic Python syntax errors; this is much less thorough than ## Several Python checks
## other options like pylint, but much faster and less strict
########################################################## ##########################################################
python_syntax: flake8:
image: alpine:3.15 # python2 is no longer available in alpine:3.16 stage: .post
image: python:3-alpine
before_script: before_script:
- apk add --update python2 - pip3 install flake8
stage: build script:
script: python -m compileall -q . - 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 when: always
########################################################## ##########################################################
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment