Skip to content

This repository demonstrates the integration of Cypress, a powerful front-end testing tool, with GitHub Actions for continuous integration and deployment (CI/CD)

Notifications You must be signed in to change notification settings

ayhanmetin/cypress-github-actions-example

Repository files navigation

Cypress Github Actions Example

cypress-github-action

Overview

This repository demonstrates the integration of Cypress, a powerful front-end testing tool, with GitHub Actions for continuous integration and deployment (CI/CD).

Cypress allows for writing tests that interact with a web application in the same way a user would, and GitHub Actions provides a platform for automating these tests every time code is pushed to the repository.

Cypress Test Suite

This repository includes a Cypress test suite that interacts with a todo list web application, much like a real user would.

GitHub Actions Workflow

The main workflow file, ci.yml, orchestrates the execution of Cypress tests on every push event. The workflow runs on an Ubuntu 22.04 environment.

Below is a step-by-step explanation of the workflow:

Checkout

The workflow checks out your repository using actions/checkout@v3.

Cypress Run

This step installs the necessary npm dependencies, correctly caches them, and runs all Cypress tests using cypress-io/github-action@v5.

Upload Artifacts

If the Cypress run fails, the workflow uploads the screenshots taken during the test run for debugging purposes using actions/upload-artifact@v3. The artifact is named cypress-screenshots and is stored at the cypress/screenshots path.

Upload Videos

Regardless of the test run's outcome, the workflow uploads the test run video for further examination, if necessary. The artifact is named cypress-videos and is stored at the cypress/videos path.

About

This repository demonstrates the integration of Cypress, a powerful front-end testing tool, with GitHub Actions for continuous integration and deployment (CI/CD)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published