Skip to content
This repository was archived by the owner on Aug 25, 2024. It is now read-only.

Commit ede4145

Browse files
committed
ci: Cleanup run_plugin
Signed-off-by: John Andersen <[email protected]>
1 parent 307e2e3 commit ede4145

File tree

1 file changed

+12
-23
lines changed

1 file changed

+12
-23
lines changed

.ci/run.sh

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -23,32 +23,28 @@ function run_plugin_examples() {
2323
}
2424

2525
function run_plugin() {
26-
# Create a virtualenv
27-
venv_dir="$(mktemp -d)"
28-
TEMP_DIRS+=("${venv_dir}")
29-
"${PYTHON}" -m venv "${venv_dir}"
30-
source "${venv_dir}/bin/activate"
3126
"${PYTHON}" -m pip install -U pip twine
3227

33-
"${PYTHON}" -m pip install -U -e "${SRC_ROOT}"
28+
# Install main package
29+
"${PYTHON}" -m pip install -U -e "${SRC_ROOT}[dev]"
3430

3531
if [ "x${PLUGIN}" = "xmodel/tensorflow_hub" ]; then
3632
"${PYTHON}" -m pip install -U -e "${SRC_ROOT}/model/tensorflow"
3733
fi
3834

39-
cd "${PLUGIN}"
40-
PACKAGE_NAME=$(dffml service dev setuppy kwarg name setup.py)
41-
# Install
42-
"${PYTHON}" -m pip install -e .
35+
cd "${SRC_ROOT}/${PLUGIN}"
36+
37+
# Install plugin
38+
"${PYTHON}" -m pip install -U -e .
4339
# Run the tests
4440
"${PYTHON}" setup.py test
45-
# Run examples if they exist and we aren't at the root
41+
4642
if [ "x${PLUGIN}" != "x." ]; then
43+
# Run examples if they exist and we aren't at the root
4744
run_plugin_examples
48-
fi
49-
cd "${SRC_ROOT}"
45+
else
46+
# If we are at the root. Install plugsin and run various integration tests
5047

51-
if [ "x${PLUGIN}" = "x." ]; then
5248
# Try running create command
5349
plugin_creation_dir="$(mktemp -d)"
5450
TEMP_DIRS+=("${plugin_creation_dir}")
@@ -69,20 +65,11 @@ function run_plugin() {
6965
done
7066

7167
# Install all the plugins so examples can use them
72-
"${PYTHON}" -m pip install -U -e "${SRC_ROOT}"
7368
"${PYTHON}" -m dffml service dev install
7469

7570
# Run the examples
7671
run_plugin_examples
7772

78-
# Deactivate venv
79-
deactivate
80-
81-
# Create the docs
82-
"${PYTHON}" -m pip install -U -e "${SRC_ROOT}[dev]"
83-
"${PYTHON}" -m dffml service dev install -user
84-
"${SRC_ROOT}/scripts/docs.sh"
85-
8673
# Log skipped tests to file
8774
check_skips="$(mktemp)"
8875
TEMP_DIRS+=("${check_skips}")
@@ -105,6 +92,8 @@ function run_plugin() {
10592
fi
10693
fi
10794

95+
cd "${SRC_ROOT}"
96+
10897
if [ "x${GITHUB_ACTIONS}" == "xtrue" ] && [ "x${GITHUB_REF}" == "xrefs/heads/master" ]; then
10998
git status
11099
dffml service dev release "${PLUGIN}"

0 commit comments

Comments
 (0)