ci: add explicit venv cleanup before setup in all workflows to prevent cache corruption
Some checks failed
API Endpoint Tests / test-api-endpoints (push) Successful in 10s
CLI Tests / test-cli (push) Failing after 41s
Integration Tests / test-service-integration (push) Successful in 2m10s
Package Tests / Python package - aitbc-agent-sdk (push) Failing after 4s
Package Tests / Python package - aitbc-core (push) Failing after 4s
Package Tests / Python package - aitbc-crypto (push) Failing after 5s
Package Tests / Python package - aitbc-sdk (push) Failing after 4s
Package Tests / JavaScript package - aitbc-sdk-js (push) Failing after 16m15s
Production Tests / Production Integration Tests (push) Failing after 7s
Python Tests / test-python (push) Failing after 1m33s
Security Scanning / security-scan (push) Failing after 3s
Staking Tests / test-staking-service (push) Failing after 2m21s
Staking Tests / test-staking-integration (push) Has been skipped
Staking Tests / test-staking-contract (push) Has been skipped
Staking Tests / run-staking-test-runner (push) Has been skipped
Package Tests / JavaScript package - aitbc-token (push) Failing after 12m54s
Some checks failed
API Endpoint Tests / test-api-endpoints (push) Successful in 10s
CLI Tests / test-cli (push) Failing after 41s
Integration Tests / test-service-integration (push) Successful in 2m10s
Package Tests / Python package - aitbc-agent-sdk (push) Failing after 4s
Package Tests / Python package - aitbc-core (push) Failing after 4s
Package Tests / Python package - aitbc-crypto (push) Failing after 5s
Package Tests / Python package - aitbc-sdk (push) Failing after 4s
Package Tests / JavaScript package - aitbc-sdk-js (push) Failing after 16m15s
Production Tests / Production Integration Tests (push) Failing after 7s
Python Tests / test-python (push) Failing after 1m33s
Security Scanning / security-scan (push) Failing after 3s
Staking Tests / test-staking-service (push) Failing after 2m21s
Staking Tests / test-staking-integration (push) Has been skipped
Staking Tests / test-staking-contract (push) Has been skipped
Staking Tests / run-staking-test-runner (push) Has been skipped
Package Tests / JavaScript package - aitbc-token (push) Failing after 12m54s
Added `rm -rf venv` (and `venv-build` where applicable) before venv setup in all CI workflows to ensure clean installations and prevent cache corruption issues. Removed redundant venv corruption detection and rebuild logic from package-tests.yml since explicit cleanup makes it unnecessary.
This commit is contained in:
@@ -34,6 +34,10 @@ jobs:
|
|||||||
- name: Setup test environment
|
- name: Setup test environment
|
||||||
run: |
|
run: |
|
||||||
cd /var/lib/aitbc-workspaces/api-tests/repo
|
cd /var/lib/aitbc-workspaces/api-tests/repo
|
||||||
|
|
||||||
|
# Remove any existing venv to avoid cache corruption issues
|
||||||
|
rm -rf venv
|
||||||
|
|
||||||
bash scripts/ci/setup-python-venv.sh \
|
bash scripts/ci/setup-python-venv.sh \
|
||||||
--repo-dir "$PWD" \
|
--repo-dir "$PWD" \
|
||||||
--venv-dir "$PWD/venv" \
|
--venv-dir "$PWD/venv" \
|
||||||
|
|||||||
@@ -33,6 +33,9 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cd /var/lib/aitbc-workspaces/cli-tests/repo
|
cd /var/lib/aitbc-workspaces/cli-tests/repo
|
||||||
|
|
||||||
|
# Remove any existing venv to avoid cache corruption issues
|
||||||
|
rm -rf venv
|
||||||
|
|
||||||
# Ensure standard directories exist
|
# Ensure standard directories exist
|
||||||
mkdir -p /var/lib/aitbc/data /var/lib/aitbc/keystore /etc/aitbc /var/log/aitbc
|
mkdir -p /var/lib/aitbc/data /var/lib/aitbc/keystore /etc/aitbc /var/log/aitbc
|
||||||
|
|
||||||
|
|||||||
@@ -107,6 +107,10 @@ jobs:
|
|||||||
- name: Setup test environment
|
- name: Setup test environment
|
||||||
run: |
|
run: |
|
||||||
cd /var/lib/aitbc-workspaces/integration-tests/repo
|
cd /var/lib/aitbc-workspaces/integration-tests/repo
|
||||||
|
|
||||||
|
# Remove any existing venv to avoid cache corruption issues
|
||||||
|
rm -rf venv
|
||||||
|
|
||||||
bash scripts/ci/setup-python-venv.sh \
|
bash scripts/ci/setup-python-venv.sh \
|
||||||
--repo-dir "$PWD" \
|
--repo-dir "$PWD" \
|
||||||
--venv-dir "$PWD/venv" \
|
--venv-dir "$PWD/venv" \
|
||||||
|
|||||||
@@ -53,22 +53,14 @@ jobs:
|
|||||||
# Ensure standard directories exist
|
# Ensure standard directories exist
|
||||||
mkdir -p /var/lib/aitbc/data /var/lib/aitbc/keystore /etc/aitbc /var/log/aitbc
|
mkdir -p /var/lib/aitbc/data /var/lib/aitbc/keystore /etc/aitbc /var/log/aitbc
|
||||||
|
|
||||||
bash "$WORKSPACE/repo/scripts/ci/setup-python-venv.sh" \
|
# Remove any existing venv to avoid cache corruption issues
|
||||||
--repo-dir "$PWD" \
|
rm -rf venv venv-build
|
||||||
--venv-dir "$PWD/venv" \
|
|
||||||
--mode copy \
|
|
||||||
--extra-packages "pytest mypy black"
|
|
||||||
|
|
||||||
# Validate venv and rebuild if corrupted
|
|
||||||
if [[ ! -x "venv/bin/pip" ]]; then
|
|
||||||
echo "⚠️ Corrupted venv detected, rebuilding..."
|
|
||||||
rm -rf venv
|
|
||||||
bash "$WORKSPACE/repo/scripts/ci/setup-python-venv.sh" \
|
bash "$WORKSPACE/repo/scripts/ci/setup-python-venv.sh" \
|
||||||
--repo-dir "$PWD" \
|
--repo-dir "$PWD" \
|
||||||
--venv-dir "$PWD/venv" \
|
--venv-dir "$PWD/venv" \
|
||||||
--mode copy \
|
--mode copy \
|
||||||
--extra-packages "pytest mypy black"
|
--extra-packages "pytest mypy black"
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "${{ matrix.package.name }}" == "aitbc-sdk" ]]; then
|
if [[ "${{ matrix.package.name }}" == "aitbc-sdk" ]]; then
|
||||||
venv/bin/pip install -q -e "$WORKSPACE/repo/packages/py/aitbc-crypto"
|
venv/bin/pip install -q -e "$WORKSPACE/repo/packages/py/aitbc-crypto"
|
||||||
@@ -111,17 +103,6 @@ jobs:
|
|||||||
--skip-requirements \
|
--skip-requirements \
|
||||||
--extra-packages "build"
|
--extra-packages "build"
|
||||||
|
|
||||||
# Validate venv-build and rebuild if corrupted
|
|
||||||
if [[ ! -x "venv-build/bin/python" ]]; then
|
|
||||||
echo "⚠️ Corrupted venv-build detected, rebuilding..."
|
|
||||||
rm -rf venv-build
|
|
||||||
bash "$WORKSPACE/repo/scripts/ci/setup-python-venv.sh" \
|
|
||||||
--repo-dir "$PWD" \
|
|
||||||
--venv-dir "$PWD/venv-build" \
|
|
||||||
--skip-requirements \
|
|
||||||
--extra-packages "build"
|
|
||||||
fi
|
|
||||||
|
|
||||||
venv-build/bin/python -m build
|
venv-build/bin/python -m build
|
||||||
echo "✅ Package built"
|
echo "✅ Package built"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -33,6 +33,10 @@ jobs:
|
|||||||
- name: Setup test environment
|
- name: Setup test environment
|
||||||
run: |
|
run: |
|
||||||
cd /var/lib/aitbc-workspaces/production-tests/repo
|
cd /var/lib/aitbc-workspaces/production-tests/repo
|
||||||
|
|
||||||
|
# Remove any existing venv to avoid cache corruption issues
|
||||||
|
rm -rf venv
|
||||||
|
|
||||||
bash scripts/ci/setup-python-venv.sh \
|
bash scripts/ci/setup-python-venv.sh \
|
||||||
--repo-dir "$PWD" \
|
--repo-dir "$PWD" \
|
||||||
--venv-dir "$PWD/venv" \
|
--venv-dir "$PWD/venv" \
|
||||||
|
|||||||
@@ -36,6 +36,9 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cd /var/lib/aitbc-workspaces/python-tests/repo
|
cd /var/lib/aitbc-workspaces/python-tests/repo
|
||||||
|
|
||||||
|
# Remove any existing venv to avoid cache corruption issues
|
||||||
|
rm -rf venv
|
||||||
|
|
||||||
# Ensure standard directories exist
|
# Ensure standard directories exist
|
||||||
mkdir -p /var/lib/aitbc/data /var/lib/aitbc/keystore /etc/aitbc /var/log/aitbc
|
mkdir -p /var/lib/aitbc/data /var/lib/aitbc/keystore /etc/aitbc /var/log/aitbc
|
||||||
|
|
||||||
|
|||||||
@@ -42,11 +42,15 @@ jobs:
|
|||||||
# Ensure standard directories exist
|
# Ensure standard directories exist
|
||||||
mkdir -p /var/lib/aitbc/data /var/lib/aitbc/keystore /etc/aitbc /var/log/aitbc
|
mkdir -p /var/lib/aitbc/data /var/lib/aitbc/keystore /etc/aitbc /var/log/aitbc
|
||||||
|
|
||||||
|
# Remove any existing venv to avoid cache corruption issues
|
||||||
|
rm -rf venv
|
||||||
|
|
||||||
bash scripts/ci/setup-python-venv.sh \
|
bash scripts/ci/setup-python-venv.sh \
|
||||||
--repo-dir "$PWD" \
|
--repo-dir "$PWD" \
|
||||||
--venv-dir "$PWD/venv" \
|
--venv-dir "$PWD/venv" \
|
||||||
--skip-requirements \
|
--skip-requirements \
|
||||||
--extra-packages "bandit pip-audit"
|
--extra-packages "bandit pip-audit"
|
||||||
|
|
||||||
echo "✅ Security tools installed"
|
echo "✅ Security tools installed"
|
||||||
|
|
||||||
- name: Python dependency audit
|
- name: Python dependency audit
|
||||||
|
|||||||
@@ -36,6 +36,9 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cd /var/lib/aitbc-workspaces/staking-tests/repo
|
cd /var/lib/aitbc-workspaces/staking-tests/repo
|
||||||
|
|
||||||
|
# Remove any existing venv to avoid cache corruption issues
|
||||||
|
rm -rf venv
|
||||||
|
|
||||||
bash scripts/ci/setup-python-venv.sh \
|
bash scripts/ci/setup-python-venv.sh \
|
||||||
--repo-dir "$PWD" \
|
--repo-dir "$PWD" \
|
||||||
--venv-dir "$PWD/venv"
|
--venv-dir "$PWD/venv"
|
||||||
|
|||||||
Reference in New Issue
Block a user