Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Grib Processor
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Max Drexler
Grib Processor
Commits
d294ab33
Commit
d294ab33
authored
8 months ago
by
Max Drexler
Browse files
Options
Downloads
Patches
Plain Diff
Add .gitlab-ci.yml file
parent
8828cbef
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+79
-0
79 additions, 0 deletions
.gitlab-ci.yml
with
79 additions
and
0 deletions
.gitlab-ci.yml
0 → 100644
+
79
−
0
View file @
d294ab33
variables
:
PIP_CACHE_DIR
:
"
$CI_PROJECT_DIR/.cache/pip"
cache
:
paths
:
-
.cache/pip
default
:
image
:
python:latest
tags
:
[
"
docker"
,
"
ssec_shared"
]
# use shared runners at the SSEC
before_script
:
-
python --version ; pip --version
# For debugging
-
pip install -r requirements_dev.txt
workflow
:
rules
:
-
if
:
$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when
:
always
-
if
:
$CI_PIPELINE_SOURCE == 'merge_request_event'
stages
:
-
lint
-
static-analysis
-
test
-
build
-
deploy
lint-job
:
stage
:
lint
script
:
-
ruff format --check --diff --target-version py38
-
ruff check --diff --target-version py38
static-analysis-job
:
stage
:
static-analysis
script
:
-
mypy grib_processor/
test:unit
:
stage
:
test
script
:
-
coverage run -m pytest
-
coverage report
-
coverage xml
artifacts
:
untracked
:
false
when
:
on_success
expire_in
:
"
30
days"
reports
:
coverage_report
:
coverage_format
:
cobertura
path
:
./coverage.xml
coverage
:
/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/
build:dist
:
stage
:
build
rules
:
-
if
:
$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
-
if
:
$CI_COMMIT_TAG =~ /\d+\.\d+\.\d+$/
before_script
:
pip install build
script
:
-
python -m build
artifacts
:
expire_in
:
"
1
day"
paths
:
-
./dist/*.whl
-
./dist/*.tar.gz
deploy:packages:release
:
stage
:
deploy
rules
:
-
if
:
$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
-
if
:
$CI_COMMIT_TAG =~ /\d+\.\d+\.\d+$/
before_script
:
pip install twine
script
:
-
TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python -m twine upload --repository-url ${PACKAGE_REGISTRY_URL} dist/*
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