Run Cypress tests automatically using GitHub Actions
Preconditions (2)
Step 1: Create a .github/workflows directory in the repository root
Step 2: Add a workflow YAML file named cypress-tests.yml inside .github/workflows
Step 3: Configure the workflow to trigger on push and pull request events
Step 4: Set up the job to run on the latest Ubuntu runner
Step 5: Install Node.js using actions/setup-node
Step 6: Install project dependencies using npm install
Step 7: Run Cypress tests using npx cypress run
Step 8: Verify the workflow completes successfully in GitHub Actions
✅ Expected Result: GitHub Actions workflow runs Cypress tests automatically on each push or pull request and reports success or failure in the Actions tab