cypress.yml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. name: End-to-end tests
  2. on:
  3. push:
  4. branches: [ master ]
  5. pull_request:
  6. branches: [ master ]
  7. jobs:
  8. cypress-run:
  9. runs-on: ubuntu-latest
  10. steps:
  11. - name: Setup Node
  12. uses: actions/setup-node@v2
  13. with:
  14. node-version: 14
  15. - name: Checkout
  16. uses: actions/checkout@v2
  17. - name: Cypress run
  18. uses: cypress-io/github-action@v2
  19. with:
  20. build: npm run build
  21. start: npm run serve
  22. wait-on: http://localhost:5000
  23. config: baseUrl=http://localhost:5000
  24. browser: chrome
  25. env:
  26. VITE_NO_WELCOME: 1
  27. VITE_CI: 1
  28. VITE_SOCKET_URL: https://ricochetjs.herokuapp.com/
  29. VITE_API_ENDPOINT: https://ricochetjs.herokuapp.com/
  30. VITE_RICOCHET_SITEID: airboardgame
  31. ACTIONS_ALLOW_UNSECURE_COMMANDS: true
  32. - uses: actions/upload-artifact@v1
  33. if: failure()
  34. with:
  35. name: cypress-screenshots
  36. path: cypress/screenshots
  37. # Test run video was always captured, so this action uses "always()" condition
  38. - uses: actions/upload-artifact@v1
  39. if: always()
  40. with:
  41. name: cypress-videos
  42. path: cypress/videos