kalapyha / solitaire-group-9

3 stars 1 forks source link

Add e2e tests and actions #2

Closed kalapyha closed 1 year ago

kalapyha commented 1 year ago

Here's an example of how you could add Cypress to an existing React project and run tests using GitHub Actions:

name: Cypress Tests

on:
  push:
    branches:
      - main

jobs:
  cypress:
    runs-on: ubuntu-latest

    steps:
    - name: Checkout code
      uses: actions/checkout@v2

    - name: Install dependencies
      run: npm ci

    - name: Run Cypress tests
      run: npm run cy:run

This workflow will run Cypress tests on the main branch every time you push to it.

kalapyha commented 1 year ago

We can add cypress and create/update action to run e2e tests for each PR Please read the doc here https://www.cypress.io/ for more information

kalapyha commented 1 year ago

Done. Now we have a full setup for e2e tests using Cypress. I've added a workflow so we are running these tests on push too.

Image

You can also check this Badge Image