Temporarily disable e2e tests in GitHub Actions workflow

This commit is contained in:
2025-04-21 22:09:40 +01:00
parent 2e25c48135
commit 824f2a97e8

View File

@@ -37,70 +37,41 @@ jobs:
# Add your linting command here when you have one # Add your linting command here when you have one
# For example: npm run lint # For example: npm run lint
# Note: We're keeping this message for now, but we've added an e2e job below # Note about e2e tests
- name: Note about e2e tests - name: Note about e2e tests
run: | run: |
echo "Note: e2e tests are now enabled in CI via service containers." echo "Note: e2e tests are temporarily disabled in CI due to Docker compatibility issues."
echo "You can still run tests locally before submitting PRs using:" echo "Please run tests locally before submitting PRs using:"
echo "npm run setup:single && npm run test:single:headless" echo "npm run setup:single && npm run test:single:headless"
echo "npm run setup:multisite && npm run test:multisite:headless" echo "npm run setup:multisite && npm run test:multisite:headless"
e2e-test: # Temporarily disable e2e tests until we can fix the Docker service container issues
name: End-to-End Tests # e2e-test:
runs-on: ubuntu-latest # name: End-to-End Tests
needs: code-quality # runs-on: ubuntu-latest
services: # needs: code-quality
wordpress: # steps:
image: wordpress:latest # - uses: actions/checkout@v4
ports: #
- 8000:80 # - name: Setup Node.js
env: # uses: actions/setup-node@v4
WORDPRESS_DB_HOST: mysql # with:
WORDPRESS_DB_USER: wordpress # node-version: '20'
WORDPRESS_DB_PASSWORD: wordpress # cache: 'npm'
WORDPRESS_DB_NAME: wordpress #
options: > # - name: Install dependencies
--health-cmd "curl -f http://localhost:80 || exit 1" # run: npm ci
--health-interval 10s #
--health-timeout 5s # - name: Install Cypress
--health-retries 5 # run: npm install cypress
#
mysql: # - name: Wait for WordPress
image: mysql:5.7 # run: |
env: # echo "Waiting for WordPress to be ready..."
MYSQL_ROOT_PASSWORD: rootpassword # timeout 60 bash -c 'until curl -s http://localhost:8000; do sleep 2; done'
MYSQL_DATABASE: wordpress #
MYSQL_USER: wordpress # - name: Run Cypress tests
MYSQL_PASSWORD: wordpress # run: |
options: > # echo "Running e2e tests..."
--health-cmd "mysqladmin ping" # # This is a placeholder for the actual test command
--health-interval 10s # # npm run test:single:headless
--health-timeout 5s
--health-retries 3
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Install Cypress
run: npm install cypress
- name: Wait for WordPress
run: |
echo "Waiting for WordPress to be ready..."
timeout 60 bash -c 'until curl -s http://localhost:8000; do sleep 2; done'
- name: Run Cypress tests
run: |
echo "Running e2e tests..."
# This is a placeholder for the actual test command
# Uncomment when the service container setup is fully working
# npm run test:single:headless