Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/victordrose/hangar
Browse files Browse the repository at this point in the history
  • Loading branch information
victordrose committed Dec 21, 2023
2 parents ac1aa40 + 7223fbd commit 3241b29
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 19 deletions.
4 changes: 1 addition & 3 deletions scripts/pipelines/azure-devops/templates/ci/ci-pipeline.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ yamlFile="ci-pipeline.yml"
scriptFile=("build.sh" "test.sh" "quality.sh")
# Source branch.
sourceBranch="feature/ci-pipeline"
# Setup Environment script
setupScriptFile="quality-setup-environment.sh"


# Function that copies the script to build, test and check quality of the application.
function copyScript {
Expand All @@ -26,7 +25,6 @@ function copyScript {
fi
# Copy the quality script.
cp "${hangarPath}/${commonTemplatesPipelinePath[2]}/${language}-${scriptFile[2]}.template" "${localDirectory}/${scriptFilePath}/${scriptFile[2]}"
! [ -f "${hangarPath}/${commonTemplatesPipelinePath[2]}/${language}-${setupScriptFile}" ] || cp "${hangarPath}/${commonTemplatesPipelinePath[2]}/${language}-${setupScriptFile}" "${localDirectory}/${scriptFilePath}/${setupScriptFile}"
}

# Function that adds the variables to be used in the pipeline.
Expand Down
10 changes: 5 additions & 5 deletions scripts/pipelines/common/templates/build/python-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ export PIP_NO_CACHE_DIR=1
export POETRY_VERSION=1.0.5

pip install "poetry==$POETRY_VERSION"
python -m venv /venv
poetry export --without-hashes -f requirements.txt | /venv/bin/pip install -r /dev/stdin
python -m venv ./venv
poetry export --without-hashes -f requirements.txt | ./venv/bin/pip install -r /dev/stdin
# shellcheck source=/dev/null
. /venv/bin/activate
. ./venv/bin/activate
mypy .
poetry build && /venv/bin/pip install dist/*.whl
poetry build && ./venv/bin/pip install dist/*.whl
deactivate
mv /venv ./venv
#mv /venv ./venv

This file was deleted.

This file was deleted.

6 changes: 3 additions & 3 deletions scripts/pipelines/common/templates/test/python-test.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/bash
set -e
# shellcheck source=/dev/null
mv venv /venv
#mv venv ./venv
# shellcheck source=/dev/null
. /venv/bin/activate
. ./venv/bin/activate
coverage run -m unittest
coverage report
coverage xml
coverage xml

0 comments on commit 3241b29

Please sign in to comment.