Skip to content

Commit 77e89ab

Browse files
- Tuning build automation.
1 parent 8efa84c commit 77e89ab

File tree

3 files changed

+24
-12
lines changed

3 files changed

+24
-12
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1017,8 +1017,8 @@ jobs:
10171017
10181018
- shell: wsl-bash {0}
10191019
name: Run robot mocked functional tests
1020-
env:
1021-
PYTHONPATH: '${{ env.PYTHONPATH }}:${{ github.workspace }}/test/python'
1020+
# env:
1021+
# PYTHONPATH: '${{ env.PYTHONPATH }}:${{ github.workspace }}/test/python'
10221022
run: |
10231023
. cicd/version.txt
10241024
export BUILDBRANCH="${{github.ref}}"
@@ -1033,6 +1033,7 @@ jobs:
10331033
then
10341034
export BUILDPATCHVERSION="${BUILDPATCHVERSION}"
10351035
fi
1036+
export PYTHONPATH="$PYTHONPATH:$(pwd)/test/python"
10361037
python3 cicd/python/build.py --robot-test --config='{ "variables": { "IS_WSL": true } }'
10371038
10381039
- shell: wsl-bash {0}
@@ -1047,7 +1048,7 @@ jobs:
10471048
if: env.AZURE_CLIENT_SECRET != ''
10481049
env:
10491050
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
1050-
PYTHONPATH: '${{ env.PYTHONPATH }}:${{ github.workspace }}/test/python'
1051+
# PYTHONPATH: '${{ env.PYTHONPATH }}:${{ github.workspace }}/test/python'
10511052
run: |
10521053
. cicd/version.txt
10531054
export AZURE_CLIENT_ID='${{ secrets.AZURE_CLIENT_ID }}'
@@ -1069,6 +1070,7 @@ jobs:
10691070
echo "## Stray flask apps to be killed before robot tests ##"
10701071
pgrep -f flask | xargs kill -9 || true
10711072
echo "## End ##"
1073+
export PYTHONPATH="$PYTHONPATH:$(pwd)/test/python"
10721074
python3 cicd/python/build.py --robot-test-integration --config='{ "variables": { "IS_WSL": true } }'
10731075
10741076
macosbuild:

cicd/util/01-build-robot-lib.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,26 @@ PACKAGE_ROOT="${REPOSITORY_ROOT}/test"
1919

2020
venv_path="${REPOSITORY_ROOT}/.venv"
2121

22-
expectedRobotLibArtifact="$(realpath ${PACKAGE_ROOT}/dist/stackql_test_tooling-0.1.0-py3-none-any.whl)"
2322

24-
rm -f "${expectedRobotLibArtifact}" || true
23+
rm -f ${PACKAGE_ROOT}/dist/*.whl || true
2524

2625
cd "${PACKAGE_ROOT}"
2726

2827
poetry install
2928

3029
poetry build
3130

32-
if [ ! -f "${expectedRobotLibArtifact}" ]; then
33-
>&2 echo "Expected artifact not found: ${expectedRobotLibArtifact}"
31+
filez="$(ls ${PACKAGE_ROOT}/dist/*.whl)" || true
32+
33+
if [ "${filez}" = "" ]; then
34+
>&2 echo "No wheel files found in ${PACKAGE_ROOT}/dist. Please check the build process."
3435
exit 1
36+
else
37+
echo "Wheel files found in ${PACKAGE_ROOT}/dist: ${filez}"
3538
fi
3639

3740

38-
>&2 echo "Artifact built successfully: ${expectedRobotLibArtifact}"
41+
# >&2 echo "Artifact built successfully: ${expectedRobotLibArtifact}"
3942

4043

4144

cicd/util/02-install-robot-lib.sh

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ REPOSITORY_ROOT="$(realpath ${CURDIR}/../..)"
1414

1515
venv_path="${REPOSITORY_ROOT}/.venv"
1616

17-
expectedRobotLibArtifact="$(realpath ${PACKAGE_ROOT}/dist/stackql_test_tooling-0.1.0-py3-none-any.whl)"
17+
# expectedRobotLibArtifact="$(realpath ${PACKAGE_ROOT}/dist/stackql_test_tooling-0.1.0-py3-none-any.whl)"
1818

1919
if [ ! -d "${venv_path}" ]; then
2020
echo "Creating virtual environment at ${venv_path}"
@@ -23,16 +23,23 @@ else
2323
echo "Virtual environment already exists at ${venv_path}"
2424
fi
2525

26-
if [ ! -f "${expectedRobotLibArtifact}" ]; then
27-
>&2 echo "Expected lib artifact not found: ${expectedRobotLibArtifact}"
26+
filez="$(ls ${PACKAGE_ROOT}/dist/*.whl)" || true
27+
28+
if [ "${filez}" = "" ]; then
29+
>&2 echo "No wheel files found in ${PACKAGE_ROOT}/dist. Please check the build process."
2830
exit 1
31+
else
32+
echo "Wheel files found in ${PACKAGE_ROOT}/dist: ${filez}"
2933
fi
3034

3135
source ${REPOSITORY_ROOT}/.venv/bin/activate
3236

3337
pip install -r ${REPOSITORY_ROOT}/cicd/requirements.txt
3438

35-
pip install "${expectedRobotLibArtifact}" --force-reinstall
39+
for file in ${PACKAGE_ROOT}/dist/*.whl; do
40+
pip3 install "$file" --force-reinstall
41+
done
42+
3643

3744

3845

0 commit comments

Comments
 (0)