generated from EVerest/everest-template
-
Notifications
You must be signed in to change notification settings - Fork 2
46 lines (44 loc) · 1.34 KB
/
e2e-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
# SPDX-License-Identifier: Apache-2.0
# Copyright 2020 - 2024 Pionix GmbH and Contributors to EVerest
name: Cypress Tests
on:
pull_request:
branches:
- '*'
push:
branches:
- main
jobs:
build-and-e2e-test:
runs-on: ubuntu-latest
strategy:
matrix:
browser: ['electron', 'firefox']
steps:
- uses: actions/checkout@v4
- name: Setup node + pnpm install
uses: ./.github/actions/setup-node
with:
pnpm-version: 9
- name: Run Cypress Tests
uses: cypress-io/github-action@v6
with:
start: pnpm dlx http-server dist -p 4173
build: pnpm build
wait-on: 'http://localhost:4173' # Adjust according to your server port
wait-on-timeout: 60
command: pnpm exec cypress run --browser ${{ matrix.browser }} --headless --config baseUrl=http://localhost:4173,video=true
- uses: actions/upload-artifact@v4
if: failure()
name: Upload cypress screenshots if tests fail
with:
name: cypress-screenshots
path: cypress/screenshots
if-no-files-found: ignore
- uses: actions/upload-artifact@v4
if: failure()
name: Upload cypress videos if tests fail
with:
name: cypress-videos
path: cypress/videos
if-no-files-found: ignore