Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
plotID_python
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
plotID
plotID_python
Merge requests
!31
Set sast config 1
Code
Review changes
Check out branch
Open in Workspace
Download
Patches
Plain diff
Expand sidebar
Merged
Set sast config 1
set-sast-config-1
into
dev
Overview
0
Commits
2
Pipelines
4
Changes
1
Merged
Set sast config 1
Mayr, Hannes
requested to merge
set-sast-config-1
into
dev
Sep 27, 2022
Overview
0
Commits
2
Pipelines
4
Changes
1
0
0
Merge request reports
Compare
dev
version 1
e2deb3e8
Sep 27, 2022
dev (base)
and
latest version
latest version
f023a9d3
2 commits,
Sep 27, 2022
version 1
e2deb3e8
3 commits,
Sep 27, 2022
1 file
+
32
−
62
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
.gitlab-ci.yml
+
32
−
62
View file @ f023a9d3
Edit in single-file editor
Open in Web IDE
Show full file
# This file is a template, and might need editing before it works on your project.
# To contribute improvements to CI/CD templates, please follow the Development guide at:
# https://docs.gitlab.com/ee/development/cicd/templates.html
# This specific template is located at:
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml
# Official language image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/python/tags/
image
:
python:latest
stages
:
-
linting
-
testing
-
docs
-
linting
-
testing
-
docs
-
test
# Change pip's cache directory to be inside the project directory since we can
# only cache local items.
variables
:
PIP_CACHE_DIR
:
"
$CI_PROJECT_DIR/.cache/pip"
# Pip's cache doesn't store the python packages
# https://pip.pypa.io/en/stable/reference/pip_install/#caching
#
# If you want to also cache the installed packages, you have to install
# them in a virtualenv and cache it as well.
cache
:
paths
:
# - .cache/pip #
# - venv/ #
before_script
:
-
python --version
# For debugging
-
pip install -r requirements.txt
# install dependencies from file
# - pip install virtualenv
# - virtualenv venv
# - source venv/bin/activate
-
python --version
# For debugging
-
pip install -r requirements.txt
# install dependencies from file
PEP8
:
stage
:
linting
script
:
-
pip install flake8
-
flake8 --count .
# PEP8 linting
script
:
-
pip install flake8
-
flake8 --count .
Pylint
:
stage
:
linting
# allow_failure: true
script
:
-
pip install pylint
-
find . -type f -name '*.py' | xargs pylint -rn --rcfile='plotid/.pylintrc'
# Find all python files and check the code with pylint.
script
:
-
pip install pylint
-
find . -type f -name '*.py' | xargs pylint -rn --rcfile='plotid/.pylintrc'
# Find all python files and check the code with pylint
test
:
stage
:
testing
tags
:
-
docker
tags
:
-
docker
script
:
# - python -m unittest discover -s ./tests/ -p "test*" # deprecated unittest command
-
python tests/runner_tests.py
coverage
:
'
/TOTAL.*\s+(\d+\.\d+%)$/'
# - pip install tox flake8 # you can also use tox
# - tox -e py36,flake8
-
python tests/runner_tests.py
coverage
:
"
/TOTAL.*
\\
s+(
\\
d+
\\
.
\\
d+%)$/"
pages
:
stage
:
docs
script
:
-
pip install -U sphinx sphinx-autoapi sphinx_rtd_theme myst-parser
# sphinx_panels
-
pip install -U sphinx sphinx-autoapi sphinx_rtd_theme myst-parser
# sphinx_panels
-
cd docs
-
make html
-
mv build/html/ ../public
@@ -72,17 +41,18 @@ pages:
paths
:
-
public
rules
:
-
if
:
$CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
-
when
:
manual
# Commenting out all other stages and jobs
#run:
# script:
# - python setup.py bdist_wheel
# # an alternative approach is to install and run:
# - pip install dist/*
# # run the command here
# artifacts:
# paths:
# - dist/*.whl
-
if
:
"
$CI_COMMIT_REF_NAME
==
$CI_DEFAULT_BRANCH"
-
when
:
manual
sast
:
variables
:
SAST_EXCLUDED_PATHS
:
spec, test, tmp
stage
:
test
include
:
-
template
:
Security/SAST.gitlab-ci.yml
# You can override the included template(s) by including variable overrides
# SAST customization: https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings
# Secret Detection customization: https://docs.gitlab.com/ee/user/application_security/secret_detection/#customizing-settings
# Dependency Scanning customization: https://docs.gitlab.com/ee/user/application_security/dependency_scanning/#customizing-the-dependency-scanning-settings
# Container Scanning customization: https://docs.gitlab.com/ee/user/application_security/container_scanning/#customizing-the-container-scanning-settings
# Note that environment variables can be set in several places
# See https://docs.gitlab.com/ee/ci/variables/#cicd-variable-precedence
Loading