Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .github/workflows/selenium.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Robust Selenium IDE Tests with Docker Compose Astro App and Selenium Container

on:
pull_request:
branches:
- cardinal-quarter

jobs:
selenium-tests:
runs-on: ubuntu-latest

services:
selenium-firefox:
image: selenium/standalone-firefox:4.22.0
ports:
- "4444:4444"
- "7900:7900"
volumes:
- /dev/shm:/dev/shm
options: --shm-size=2g

steps:
- name: Checkout repository code
uses: actions/checkout@v4

- name: Bring up Astro App with Docker Compose
run: |
echo "Starting Astro application with Docker Compose..."
docker compose up -d
echo "Waiting for Astro app to be healthy on localhost:4000 (mapped from container port 4321)..."
for i in `seq 1 60`; do
curl -s http://localhost:4000 > /dev/null && break
echo "Astro app not ready yet, waiting 1 second..."
sleep 1
done
echo "Astro app should be running now."

- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 18

- name: Install selenium-side-runner globally
run: npm install -g selenium-side-runner

- name: Wait for Selenium Firefox service to be fully ready
run: |
echo "Waiting an additional 30 seconds for Selenium Firefox to stabilize..."
sleep 30

# --- CAMBIO CRUCIAL AQUÍ: Comando en una sola línea ---
- name: Run Selenium Tests for Ideal-tests-local.side
run: selenium-side-runner --server http://localhost:4444/wd/hub -c '{"browserName":"firefox"}' --timeout 60000 tests/dev-local/Ideal-tests-local.side

# --- Y TAMBIÉN AQUÍ: Comando en una sola línea ---
- name: Run Selenium Tests for ideal-tests-prod.side
run: selenium-side-runner --server http://localhost:4444/wd/hub -c '{"browserName":"firefox"}' --timeout 60000 tests/prod/ideal-tests-prod.side
Loading
Loading