main.yml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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: Checkout
  12. uses: actions/checkout@v2
  13. - name: Cypress run
  14. uses: cypress-io/github-action@v2
  15. with:
  16. build: npm run build
  17. start: npm run serve
  18. wait-on: http://localhost:5000
  19. config: baseUrl=http://localhost:5000
  20. browser: chrome
  21. env:
  22. VITE_NO_WELCOME: 1
  23. VITE_CI: 1
  24. VITE_SOCKET_URL: https://ricochetjs.herokuapp.com/
  25. VITE_API_ENDPOINT: https://ricochetjs.herokuapp.com/
  26. ACTIONS_ALLOW_UNSECURE_COMMANDS: true
  27. - uses: actions/upload-artifact@v1
  28. if: failure()
  29. with:
  30. name: cypress-screenshots
  31. path: cypress/screenshots
  32. # Test run video was always captured, so this action uses "always()" condition
  33. - uses: actions/upload-artifact@v1
  34. if: always()
  35. with:
  36. name: cypress-videos
  37. path: cypress/videos