Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
gitlab_shared_files
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Eclipse Projects
aidge
gitlab_shared_files
Commits
26687a9b
Commit
26687a9b
authored
10 months ago
by
Grégoire Kubler
Browse files
Options
Downloads
Patches
Plain Diff
feat : refactored unit tests to be more comprehensible
parent
e3745d3e
No related branches found
No related tags found
1 merge request
!8
multiple fixes
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab/ci/release/pip.gitlab-ci.yml
+9
-17
9 additions, 17 deletions
.gitlab/ci/release/pip.gitlab-ci.yml
with
9 additions
and
17 deletions
.gitlab/ci/release/pip.gitlab-ci.yml
+
9
−
17
View file @
26687a9b
...
...
@@ -16,7 +16,6 @@ release:pip:ubuntu:
-
apt-get install -y -qq python-is-python3 pip git curl
script
:
-
ls venv/bin/activate
-
source venv/bin/activate
-
set -x
-
python -m pip wheel . -w wheelhouse
...
...
@@ -29,22 +28,15 @@ release:pip:ubuntu:
python3 -m pip install requests
fi
-
echo "Uninstalling $CI_PROJECT_NAME to install the wheel created"
-
export WHEEL_NAME=$(find wheelhouse/ -name "$CI_PROJECT_NAME*.whl")
-
echo "Wheel name = ${WHEEL_NAME}"
-
python -m pip uninstall -y $CI_PROJECT_NAME
-
python -m pip install $WHEEL_NAME
-
python -m pip list
###############################################################################
# Repo name is changed the repo name with mv in order to perform the test
# on the installed package and not on the source code
# https://stackoverflow.com/questions/56908227/how-to-test-python-wheels-on-ci
###############################################################################
-
echo "Current working directory = $(pwd)"
-
rm -rf temp_src
-
mv $CI_PROJECT_NAME temp_src
-
python -m pytest temp_src/unit_tests/
-
mv temp_src $CI_PROJECT_NAME
-
export WHEELS=$(find wheelhouse/ -name "$CI_PROJECT_NAME*.whl")
-
echo "Reinstalling each found wheels = ${WHEELS}"
-
>
for wheel in $WHEELS; do # not sure if a for loop is needed here but just in case multiple wheels are found
python -m pip install --force-reinstall $WHEEL_NAME
python -m pip list
cd $CI_PROJECT_NAME # entering package so python doesn't import local package and in
python -m pytest unit_tests/*
done
deploy:pip:ubuntu
:
extends
:
...
...
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