Skip to content

ci: add cypress E2E workflow#5745

Merged
walterbender merged 4 commits intosugarlabs:masterfrom
Jetshree:add-e2e-workflow
Feb 15, 2026
Merged

ci: add cypress E2E workflow#5745
walterbender merged 4 commits intosugarlabs:masterfrom
Jetshree:add-e2e-workflow

Conversation

@Jetshree
Copy link
Contributor

Description

This PR adds a GitHub Actions workflow to automatically run Cypress E2E tests on every pull request and push to master.

The project already has Cypress configured with E2E tests in cypress/e2e/main.cy.js covering loading, audio controls, toolbar/navigation, file operations, UI elements, and Planet page interactions but there was no CI workflow to run them automatically. This PR closes that gap.

Triggers

  • pull_request on opened and synchronize (every new commit on a PR)
  • push to master branch

Steps

Step Action Details
Checkout actions/checkout@v4 Checks out PR code
Setup Node actions/setup-node@v4 Node 20 with npm caching
Run Cypress cypress-io/github-action@v6 Installs deps (npm ci), starts server (npm start), waits for http://127.0.0.1:3000, runs all E2E tests in Chrome
Upload Screenshots actions/upload-artifact@v4 Uploads cypress/screenshots as artifact on failure only

Security & Best Practices

  • Uses pull_request (not pull_request_target) to ensure safe execution for external fork contributions
  • No elevated permissions required, works with default read-only token
  • Uses npm ci for reproducible installs from lockfile
  • Uses npm caching (cache: 'npm') for faster CI runs
  • Workflow fails automatically if Cypress exits with a non-zero status
  • Screenshots uploaded as artifacts on failure for easy debugging

@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@Jetshree
Copy link
Contributor Author

@walterbender the e2e test was failing because fullscreen was not working properly in the CI environment, i have fixed that problem in this PR itself so that the checks pass and the PR can be merged cleanly.

@walterbender walterbender merged commit d9697f8 into sugarlabs:master Feb 15, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants