Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
csst-pipeline
csst_proto
Commits
dc266faf
Commit
dc266faf
authored
Sep 28, 2022
by
BO ZHANG
🏀
Browse files
added installation status
parent
bcedaa23
Pipeline
#166
passed with stages
in 12 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
pipelines/build.sh
View file @
dc266faf
...
...
@@ -29,6 +29,9 @@ pip uninstall -y "$JOB_NAME"
echo
"===================== install requirements ====================="
if
[
-f
"requirements.txt"
]
;
then
pip
install
-r
requirements.txt
status_install_requirements
=
$?
else
status_install_requirements
=
0
fi
echo
"===================== install package ====================="
...
...
@@ -41,6 +44,7 @@ rm -rf dist
python setup.py build_ext
--inplace
python setup.py sdist
pip
install
dist/
*
.tar.gz
--force-reinstall
--no-deps
status_install
=
$?
#fi
echo
"===================== show package info ====================="
...
...
@@ -52,7 +56,7 @@ if [ "$JOB_NAME" != "csst_proto" ]; then
curl
-O
https://csst-tb.bao.ac.cn/code/csst-l1/csst_proto/-/raw/main/pipelines/test_codestyle.py
fi
coverage run
-m
pytest
unittest
_status
=
$?
status_
unittest
=
$?
echo
"===================== make coverage ====================="
coverage report
...
...
@@ -64,7 +68,7 @@ if [ "$JOB_NAME" != "csst_common" ]; then
echo
" > try 'from
$JOB_NAME
.top_level_interface import *'"
python
-c
"from
$JOB_NAME
.top_level_interface import *"
import_status
=
$?
if
[
"
$
import_status
"
!=
0
]
;
then
if
[
"
$
status_import
"
!=
0
]
;
then
echo
"Import failed!"
else
echo
"Import done!"
...
...
@@ -74,18 +78,25 @@ else
fi
# the exit value is determined from unit tests
if
[
"
$unittest_status
"
!=
0
]
||
[
"
$import_status
"
!=
0
]
;
then
if
[
"
$status_install_requirements
"
!=
0
]
\
||
[
"
$status_install
"
!=
0
]
\
||
[
"
$status_import
"
!=
0
]
\
||
[
"
$status_unittest
"
!=
0
]
;
then
echo
"===================== TEST SUMMARY ====================="
echo
"Test failed!"
echo
"Importability status:
$import_status
"
echo
"Unit test status:
$unittest_status
"
echo
"Install requirements:
$status_install_requirements
"
echo
"Install package:
$status_install
"
echo
"Importability status:
$status_import
"
echo
"Unit test status:
$status_unittest
"
echo
"===================== POST BUILD BELOW ====================="
exit
1
else
echo
"===================== TEST SUMMARY ====================="
echo
"Test passed!"
echo
"Importability status:
$import_status
"
echo
"Unit test status:
$unittest_status
"
echo
"Install requirements:
$status_install_requirements
"
echo
"Install package:
$status_install
"
echo
"Importability status:
$status_import
"
echo
"Unit test status:
$status_unittest
"
echo
"===================== POST BUILD BELOW ====================="
exit
0
fi
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment