*** Wartungsfenster jeden ersten Mittwoch vormittag im Monat ***

Skip to content
Snippets Groups Projects
Commit ae5606df authored by Moser, Maximilian's avatar Moser, Maximilian
Browse files

Update CI/CD configuration

parent 1082c7b5
Branches
Tags
1 merge request!65Replace setup.{py,cfg} with pyproject.toml
...@@ -7,17 +7,26 @@ stages: ...@@ -7,17 +7,26 @@ stages:
run-tests: run-tests:
stage: testing stage: testing
script: script:
- pipx install --force pip pipenv - git clean -dfx
- pipenv --rm || true - uv sync --all-extras --no-progress
- pipenv run pip install -e '.[tests,opensearch2]' - source .venv/bin/activate
- pipenv run ./run-tests.sh - ./run-tests.sh
- deactivate
coverage: /TOTAL.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/ coverage: /TOTAL.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/
artifacts:
paths:
- coverage.xml
when: on_success
access: developer
expire_in: "10 mins"
rules: rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event' - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
- if: $CI_COMMIT_TAG =~ /^v\d+/ - if: $CI_COMMIT_TAG =~ /^v\d+/
sonarqube-check: sonarqube-check:
stage: testing stage: testing
needs:
- run-tests
variables: variables:
SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache
GIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis task GIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis task
...@@ -30,15 +39,16 @@ sonarqube-check: ...@@ -30,15 +39,16 @@ sonarqube-check:
allow_failure: true allow_failure: true
rules: rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event' - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - if: $CI_COMMIT_TAG =~ /^v\d+/
pypi-release: pypi-release:
stage: release stage: release
needs:
- run-tests
rules: rules:
- if: '$CI_COMMIT_TAG =~ /^v\d+/' - if: '$CI_COMMIT_TAG =~ /^v\d+/'
script: script:
- rm -f dist/* - rm -f dist/*
- pipx run check-manifest - uv build
- pipx run build - uvx twine check dist/*
- pipx run twine check dist/* - TWINE_USERNAME=${PYPI_USER} TWINE_PASSWORD=${PYPI_PASSWORD} uvx twine upload --skip-existing --non-interactive dist/*
- TWINE_USERNAME=${PYPI_USER} TWINE_PASSWORD=${PYPI_PASSWORD} pipx run twine upload --skip-existing --non-interactive dist/*
# -*- coding: utf-8 -*-
#
# Copyright (C) 2020 FAIR Data Austria.
#
# Invenio-Config-TUW is free software; you can redistribute it and/or modify
# it under the terms of the MIT License; see LICENSE file for more details.
notifications:
email: false
sudo: false
language: python
matrix:
fast_finish: true
allow_failures:
# To allow failures, you need to specify the full environment
- env: REQUIREMENTS=devel
cache:
- pip
env:
- REQUIREMENTS=lowest
- REQUIREMENTS=release DEPLOY=true
- REQUIREMENTS=devel
python:
- "3.6"
- "3.7"
- "3.8"
before_install:
- "nvm install 6; nvm use 6"
- "travis_retry pip install --upgrade pip setuptools py"
- "travis_retry pip install twine wheel coveralls requirements-builder"
- "requirements-builder -e all --level=min setup.py > .travis-lowest-requirements.txt"
- "requirements-builder -e all --level=pypi setup.py > .travis-release-requirements.txt"
- "requirements-builder -e all --level=dev --req requirements-devel.txt setup.py > .travis-devel-requirements.txt"
install:
- "travis_retry pip install -r .travis-${REQUIREMENTS}-requirements.txt"
- "travis_retry pip install -e .[all]"
script:
- "./run-tests.sh"
after_success:
- coveralls
deploy:
provider: pypi
user: inveniosoftware
password:
secure: TODO:PYPISECUREHASH
distributions: "compile_catalog sdist bdist_wheel"
on:
tags: true
python: "3.8"
repo: fair-data-austria/invenio-config-tuw
condition: $DEPLOY = true
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment