39 lines
1.1 KiB
YAML
39 lines
1.1 KiB
YAML
name: End-to-end tests
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
jobs:
|
|
cypress-run:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Cypress run
|
|
uses: cypress-io/github-action@v2
|
|
with:
|
|
build: npm run build
|
|
start: npm run serve
|
|
wait-on: http://localhost:5000
|
|
config: baseUrl=http://localhost:5000
|
|
browser: chrome
|
|
env:
|
|
VITE_NO_WELCOME: 1
|
|
VITE_CI: 1
|
|
VITE_SOCKET_URL: https://ricochetjs.herokuapp.com/
|
|
VITE_API_ENDPOINT: https://ricochetjs.herokuapp.com/
|
|
VITE_RICOCHET_SITEID: airboardgame
|
|
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
|
|
- uses: actions/upload-artifact@v1
|
|
if: failure()
|
|
with:
|
|
name: cypress-screenshots
|
|
path: cypress/screenshots
|
|
# Test run video was always captured, so this action uses "always()" condition
|
|
- uses: actions/upload-artifact@v1
|
|
if: always()
|
|
with:
|
|
name: cypress-videos
|
|
path: cypress/videos
|