Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Airflow Datacat Integration
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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
eFlows4HPC WP2
Airflow Datacat Integration
Commits
48ebc950
Commit
48ebc950
authored
3 years ago
by
Christian Boettcher
Browse files
Options
Downloads
Patches
Plain Diff
Add gitlab ci
parent
ef57727d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Pipeline
#85041
failed
3 years ago
Stage: test
Stage: build
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+58
-0
58 additions, 0 deletions
.gitlab-ci.yml
with
58 additions
and
0 deletions
.gitlab-ci.yml
0 → 100644
+
58
−
0
View file @
48ebc950
image
:
python:3.9-slim
# 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/
stages
:
-
test
-
build
-
publish
before_script
:
-
python -V
# Print out python version for debugging
-
pip install virtualenv
-
virtualenv venv
-
source venv/bin/activate
test_package
:
stage
:
test
script
:
-
pip install -r requirements.txt
-
pytest --cov=src --cov-report=xml
artifacts
:
reports
:
cobertura
:
coverage.xml
build_package
:
stage
:
build
script
:
-
pip install -r requirements.txt
-
python -m build
artifacts
:
paths
:
-
dist/*.whl
-
dist/*.tar.gz
publish_package
:
only
:
variables
:
-
$CI_COMMIT_TAG =~ /release/
stage
:
publish
script
:
-
pip install twine
-
TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python -m twine upload --repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi 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