name: End-to-end tests

on:
  push:
    branches: [master]
  pull_request:
    branches: [master]

jobs:
  end-to-end:
    runs-on: ubuntu-16.04
    name: Cypress run
    env:
      CI: 1
    steps:
      - uses: actions/checkout@v1
      - uses: cypress-io/github-action@v1
        with:
          start: npm start
      - uses: actions/upload-artifact@v1
        if: failure()
        with:
          name: cypress-screenshots
          path: test/cypress/screenshots
      - uses: actions/upload-artifact@v1
        if: always()
        with:
          name: cypress-videos
          path: test/cypress/videos

name: End-to-end tests

on:
  push:
    branches: [master]
  pull_request:
    branches: [master]

jobs:
  end-to-end:
    runs-on: ubuntu-16.04
    name: Cypress run
    env:
      CI: 1
    steps:
      - name: Checkout code
        uses: actions/checkout@v2
      - name: Run end-to-end tests
        uses: cypress-io/github-action@v2
        with:
          start: npm start
      - name: Upload screenshots
        uses: actions/upload-artifact@v1
        if: failure()
        with:
          name: cypress-screenshots
          path: test/cypress/screenshots
      - name: Upload videos
        uses: actions/upload-artifact@v1
        if: always()
        with:
          name: cypress-videos
          path: test/cypress/videos

Update Cypress CI action to v2
Update Cypress CI action to v2
