Skip to content
Snippets Groups Projects
Commit b4f47511 authored by Jean-Baptiste Bayle's avatar Jean-Baptiste Bayle
Browse files

Merge branch '151-fix-automatic-building' into 'master'

Resolve "Fix automatic building"

Closes #151

See merge request !178
parents 86b81524 e8b9aaba
No related branches found
No related tags found
1 merge request!178Resolve "Fix automatic building"
Pipeline #350249 passed
......@@ -4,7 +4,6 @@ image: python:3.9
stages:
- test
- document
- build
- deploy
......@@ -18,11 +17,15 @@ cache:
paths:
- public
# Lint code
pylint:
stage: test
script:
- pylint lisainstrument
# Run unit tests and generate report
pytest:
stage: test
variables:
GIT_LFS_SKIP_SMUDGE: 0
script:
......@@ -32,7 +35,9 @@ pytest:
reports:
junit: report.xml
# Run simulations for integration tests
report:
stage: test
variables:
GIT_LFS_SKIP_SMUDGE: 0
script:
......@@ -45,36 +50,25 @@ report:
- "*.h5"
- "*.pdf"
dist:
# Build package
build:
stage: build
script:
- python -m build
rules:
- if: '$CI_COMMIT_TAG =~ /^v\d+(?:\.\d+){0,2}$/'
- twine check dist/*
artifacts:
paths:
- dist
expire_in: 6 months
tag-latest:
stage: deploy
image: datamachines/git-lfs
before_script:
- git config http.sslverify false
- git config user.email "${GITLAB_USER_EMAIL}"
- git config user.name "${GITLAB_USER_NAME}"
- git remote set-url origin https://gitlab-ci:${GITLAB_CI_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git
script:
- git tag --force latest
- git push --force origin latest
rules:
- if: '$CI_COMMIT_TAG =~ /^v\d+(?:\.\d+){0,2}$/'
pypi:
# Deploy to Gitlab registry
# (only for releases)
deploy:
stage: deploy
dependencies:
- build
script:
- twine check dist/*
- twine upload dist/*
dependencies:
- dist
rules:
- if: '$CI_COMMIT_TAG =~ /^v\d+(?:\.\d+){0,2}$/'
......@@ -3,6 +3,7 @@ astroid==3.2.4
asttokens==2.4.1
babel==2.16.0
backports.tarfile==1.2.0
build==1.2.2
certifi==2024.7.4
charset-normalizer==3.3.2
contourpy==1.3.0
......@@ -51,6 +52,7 @@ pure_eval==0.2.3
Pygments==2.18.0
pylint==3.2.6
pyparsing==3.1.4
pyproject_hooks==1.1.0
pytest==8.3.2
python-dateutil==2.9.0.post0
readme_renderer==43.0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment