-
Notifications
You must be signed in to change notification settings - Fork 8.3k
46 lines (40 loc) · 1.27 KB
/
cypress-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Cypress Tests
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
jobs:
e2e-tests:
runs-on: ubuntu-latest
env:
CYPRESS_COMMAND_TIMEOUT: ${{ vars.CYPRESS_COMMAND_TIMEOUT }}
steps:
- name: Checkout (GitHub)
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CYPRESS_CONTAINER_REGISTRY_TOKEN }}
- name: Build and run dev container task
uses: devcontainers/[email protected]
with:
imageName: ghcr.io/${{ vars.DOCKER_NAMESPACE }}/${{ vars.DEVCONTAINER_IMAGE_NAME }}
cacheFrom: ghcr.io/${{ vars.DOCKER_NAMESPACE }}/${{ vars.DEVCONTAINER_IMAGE_NAME }}
push: always
runCmd: cd web && yarn test:e2e:ci
- name: Upload Cypress videos
uses: actions/upload-artifact@v4
with:
name: cypress-videos
path: web/cypress/videos/**/*.mp4
if: failure()
- name: Upload Cypress screenshots
uses: actions/upload-artifact@v4
with:
name: cypress-screenshots
path: web/cypress/screenshots/**/*.png
if: failure()