Skip to content

feat: alfagift order done transaction and cart (#801) #2065

feat: alfagift order done transaction and cart (#801)

feat: alfagift order done transaction and cart (#801) #2065

Workflow file for this run

name: MCP Tests
on:
pull_request:
push:
branches: [main]
workflow_dispatch:
jobs:
mcp-pytest:
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Load environment variables from Doppler
uses: ./.github/actions/download-env
with:
doppler-token: ${{ secrets.FLYFLEET_DEV_DOPPLER_TOKEN }}
project: flyfleet
config: dev
- name: Setup ChromeFleet via WireGuard
uses: ./.github/actions/setup-chromefleet
with:
fly-api-token: ${{ env.FLY_API_TOKEN }}
fly-org-slug: ${{ env.FLY_ORG_SLUG }}
- name: check the health of chromefleet connection
run: curl -s "${{ env.CHROMEFLEET_URL }}/health"
- run: docker build -t getgather .
- run: |
docker run --network host --name getgather -d \
-e SENTRY_DSN=${{ secrets.SENTRY_DSN }} \
-e ENVIRONMENT=test \
-e DEFAULT_PROXY_TYPE=proxy-0 \
-e PROXIES_CONFIG="${{ secrets.PROXIES_CONFIG }}" \
-e CHROMEFLEET_URL="${{ env.CHROMEFLEET_URL }}" \
getgather
timeout-minutes: 3
- name: Run the health check validation
run: while ! curl -s 'http://localhost:23456/health' | grep 'OK'; do sleep 1; done
timeout-minutes: 3
- name: Run the extended health check validation
run: while ! curl -s 'http://localhost:23456/extended-health' | grep 'OK'; do sleep 1; done
timeout-minutes: 3
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
- name: Install Chromium via Playwright
run: npx playwright install chromium
- name: Find and symlink Chromium for Zendriver
run: |
chromium_path=$(ls ~/.cache/ms-playwright/chromium-*/chrome-linux64/chrome 2>/dev/null | head -1)
if [ -z "$chromium_path" ] || [ ! -f "$chromium_path" ]; then
echo "Chromium not found. Listing ms-playwright cache:"
ls -la ~/.cache/ms-playwright/ || echo "Cache directory not found"
exit 1
fi
echo "Found Chromium at: $chromium_path"
# Create symlinks for both expected paths
sudo ln -sf "$chromium_path" /bin/chromium
sudo ln -sf "$chromium_path" /usr/bin/chromium-browser
ls -la /bin/chromium
ls -la /usr/bin/chromium-browser
"$chromium_path" --version
- name: Run the tests
run: xvfb-run -a uv run pytest -m "mcp" -s
env:
HOST: http://localhost:23456
BBC_EMAIL: ${{ secrets.BBC_EMAIL }}
BBC_PASSWORD: ${{ secrets.BBC_PASSWORD }}
GOODREADS_EMAIL: ${{ secrets.GOODREADS_EMAIL }}
GOODREADS_PASSWORD: ${{ secrets.GOODREADS_PASSWORD }}
WAYFAIR_EMAIL: ${{ secrets.WAYFAIR_EMAIL }}
WAYFAIR_PASSWORD: ${{ secrets.WAYFAIR_PASSWORD }}
- name: Cleanup WireGuard
uses: ./.github/actions/wireguard-teardown
if: always()
with:
fly-api-token: ${{ env.FLY_API_TOKEN }}
fly-org-slug: ${{ env.FLY_ORG_SLUG }}
- name: Dump getgather container logs on failure
if: failure() || cancelled()
run: |-
echo "=============== CONTAINER LOGS ===================="
docker logs getgather || true