fix: use setup-python action to resolve recipe-scrapers installation
Some checks failed
Basil CI/CD Pipeline / Shared Package Tests (pull_request) Successful in 1m2s
Basil CI/CD Pipeline / Code Linting (pull_request) Successful in 1m4s
Basil CI/CD Pipeline / API Tests (pull_request) Failing after 1m6s
Basil CI/CD Pipeline / Web Tests (pull_request) Successful in 1m8s
Basil CI/CD Pipeline / Security Scanning (pull_request) Successful in 1m11s
Basil CI/CD Pipeline / Build All Packages (pull_request) Has been skipped
Basil CI/CD Pipeline / E2E Tests (pull_request) Has been skipped
Basil CI/CD Pipeline / Build & Push Docker Images (pull_request) Has been skipped
Basil CI/CD Pipeline / Trigger Deployment (pull_request) Has been skipped
Some checks failed
Basil CI/CD Pipeline / Shared Package Tests (pull_request) Successful in 1m2s
Basil CI/CD Pipeline / Code Linting (pull_request) Successful in 1m4s
Basil CI/CD Pipeline / API Tests (pull_request) Failing after 1m6s
Basil CI/CD Pipeline / Web Tests (pull_request) Successful in 1m8s
Basil CI/CD Pipeline / Security Scanning (pull_request) Successful in 1m11s
Basil CI/CD Pipeline / Build All Packages (pull_request) Has been skipped
Basil CI/CD Pipeline / E2E Tests (pull_request) Has been skipped
Basil CI/CD Pipeline / Build & Push Docker Images (pull_request) Has been skipped
Basil CI/CD Pipeline / Trigger Deployment (pull_request) Has been skipped
Replace manual Python setup with actions/setup-python@v5 to fix permission errors and silent failures that prevented recipe-scrapers from installing, causing API tests to fail with ModuleNotFoundError. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -66,25 +66,19 @@ jobs:
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
|
||||
- name: Setup Python and dependencies
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Install Python dependencies
|
||||
run: |
|
||||
# Try to install Python and pip if needed
|
||||
if ! command -v python3 &> /dev/null; then
|
||||
echo "Python3 not found, attempting to install..."
|
||||
if command -v apt-get &> /dev/null; then
|
||||
apt-get update -qq && apt-get install -y -qq python3 python3-pip
|
||||
elif command -v apk &> /dev/null; then
|
||||
apk add --no-cache python3 py3-pip
|
||||
else
|
||||
echo "No package manager found, trying to continue without Python installation..."
|
||||
fi
|
||||
fi
|
||||
# Install recipe-scrapers using python3 -m pip (more reliable than pip3 command)
|
||||
if command -v python3 &> /dev/null; then
|
||||
python3 -m pip install --user recipe-scrapers || pip3 install --user recipe-scrapers || echo "Warning: Could not install recipe-scrapers"
|
||||
else
|
||||
echo "Warning: Python3 not available, scraper tests will be skipped"
|
||||
fi
|
||||
python3 -m pip install --upgrade pip
|
||||
python3 -m pip install recipe-scrapers
|
||||
|
||||
- name: Verify Python dependencies
|
||||
run: |
|
||||
python3 -c "import recipe_scrapers; print('✓ recipe-scrapers installed successfully')"
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
Reference in New Issue
Block a user