Skip to content

Platform E2E Tests

Platform E2E Tests #64

name: Platform E2E Tests
on:
schedule:
- cron: '0 0 * * *' # Run daily at midnight
workflow_dispatch: # Allow manual triggering
push:
paths:
- '.github/workflows/nightly-e2e-platform-ui.yml'
jobs:
e2e-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive' # Get submodule for couchdb snapshot
- name: Display submodule information
run: |
echo "Submodule information:"
git submodule status
echo "CouchDB snapshot details:"
cd test-couch && git log -1 --pretty=format:'%h - %s (%cr) <%an>'
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'yarn'
- name: Setup Docker
uses: docker/setup-buildx-action@v2
- name: Install dependencies
run: yarn install
- name: Install Cypress
run: yarn workspace @vue-skuilder/platform-ui cypress install
- name: Build prereqs
run: yarn build:lib
- name: Setup and wait for services
run: |
# Start the dev environment in background
yarn dev:platform &
# Wait for the webserver to be ready
npx wait-on --timeout 5m http://localhost:5173
# Wait for the database to be ready
npx wait-on --timeout 5m http://localhost:5984
# Wait for the backend to be ready
npx wait-on --timeout 5m http://localhost:3000
- name: Run E2E tests
run: |
# Run Cypress tests
yarn workspace @vue-skuilder/platform-ui cypress run
- name: Cleanup services
if: always()
run: |
# Clean up
kill $(lsof -t -i:5173) || true
kill $(lsof -t -i:3000) || true
yarn couchdb:stop
- name: Upload screenshots on failure
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
path: packages/platform-ui/cypress/screenshots
retention-days: 7 # Optional: set retention period
- name: Upload videos
uses: actions/upload-artifact@v4
if: always()
with:
name: cypress-videos
path: packages/platform-ui/cypress/videos
retention-days: 7 # Optional: set retention period