Skip to content
Snippets Groups Projects
Commit e63ca243 authored by Mayr, Hannes's avatar Mayr, Hannes
Browse files

Merge branch '37-automated-build' into 'dev'

Resolve "Automated build"

See merge request !55
parents cb27fbe0 36af83e4
No related branches found
No related tags found
2 merge requests!59Version v0.2.3,!55Resolve "Automated build"
Pipeline #888171 passed
...@@ -4,6 +4,8 @@ stages: ...@@ -4,6 +4,8 @@ stages:
- testing - testing
- security - security
- docs - docs
- package
- release
# Change pip's cache directory to be inside the project directory since we can # Change pip's cache directory to be inside the project directory since we can
# only cache local items. # only cache local items.
...@@ -17,24 +19,28 @@ before_script: ...@@ -17,24 +19,28 @@ before_script:
- pip install --user --no-warn-script-location -r requirements.txt # install dependencies from file - pip install --user --no-warn-script-location -r requirements.txt # install dependencies from file
PEP8: PEP8:
stage: linting stage: linting
needs: []
script: script:
- pip install flake8 - pip install flake8
- flake8 --count --max-line-length=88 . - flake8 --count --max-line-length=88 .
Pylint: Pylint:
stage: linting stage: linting
needs: []
script: script:
- pip install pylint - pip install pylint
- find . -type f -name '*.py' | xargs pylint -rn --rcfile='plotid/.pylintrc' # Find all python files and check the code with pylint - find . -type f -name '*.py' | xargs pylint -rn --rcfile='plotid/.pylintrc' # Find all python files and check the code with pylint
Autoformatting: Autoformatting:
stage: linting stage: linting
needs: []
script: script:
- pip install black - pip install black
- black --check --verbose --diff --color . - black --check --verbose --diff --color .
Typechecker: Typechecker:
stage: linting stage: linting
needs: []
script: script:
- pip install mypy - pip install mypy
- mypy --ignore-missing-imports --strict plotid examples - mypy --ignore-missing-imports --strict plotid examples
...@@ -42,6 +48,7 @@ Typechecker: ...@@ -42,6 +48,7 @@ Typechecker:
test: test:
stage: testing stage: testing
needs: []
tags: tags:
- docker - docker
script: script:
...@@ -85,6 +92,28 @@ include: ...@@ -85,6 +92,28 @@ include:
- template: Security/Dependency-Scanning.gitlab-ci.yml - template: Security/Dependency-Scanning.gitlab-ci.yml
- template: Security/License-Scanning.gitlab-ci.yml - template: Security/License-Scanning.gitlab-ci.yml
build_and_upload:
stage: package
script:
- pip install build twine
- python3 -m build
- TWINE_PASSWORD=${CI_PYPI_TOKEN} TWINE_USERNAME=__token__ python3 -m twine upload dist/*
rules:
- if: $CI_COMMIT_TAG
release_job:
stage: release
image: registry.gitlab.com/gitlab-org/release-cli:latest
rules:
- if: $CI_COMMIT_TAG # Run this job when a tag is created
before_script:
- echo "No before script pls"
script:
- echo "running release_job"
release: # See https://docs.gitlab.com/ee/ci/yaml/#release for available properties
tag_name: '$CI_COMMIT_TAG'
description: '$CI_COMMIT_TAG'
# You can override the included template(s) by including variable overrides # 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 # 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 # Secret Detection customization: https://docs.gitlab.com/ee/user/application_security/secret_detection/#customizing-settings
......
...@@ -10,5 +10,5 @@ research data, the plot is based on. Additionally, the script that created the ...@@ -10,5 +10,5 @@ research data, the plot is based on. Additionally, the script that created the
plot will also be copied to the directory. plot will also be copied to the directory.
""" """
__version__ = "0.2.2" __version__ = "0.2.2-b3"
__author__ = "Institut Fluidsystemtechnik within nfdi4ing at TU Darmstadt" __author__ = "Institut Fluidsystemtechnik within nfdi4ing at TU Darmstadt"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment