-
Notifications
You must be signed in to change notification settings - Fork 70
96 lines (80 loc) · 2.61 KB
/
Copy pathcross-browser.yml
File metadata and controls
96 lines (80 loc) · 2.61 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: Cross-Browser Tests
on:
merge_group:
workflow_dispatch:
pull_request:
types:
- opened
- synchronize
push:
branches:
- main
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
env:
NODE_VERSION: 22
jobs:
build:
name: Build Package
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}
- name: Build package
uses: ./.github/actions/build
with:
node: ${{ env.NODE_VERSION }}
- name: Upload build artifacts
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: dist-${{ github.run_id }}
path: dist
retention-days: 1
cross-browser:
needs: build
name: ${{ matrix.browser }}
runs-on: ${{ matrix.os }}
timeout-minutes: 25
strategy:
fail-fast: false
matrix:
os: [windows-latest]
browser: [chrome, edge, firefox]
steps:
- name: Checkout code
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}
- name: Download build artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: dist-${{ github.run_id }}
path: dist
- name: Setup Node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install dependencies
run: npm i
- name: Run cross-browser tests
uses: cypress-io/github-action@fa4a118725a8f001170d49631ea89e5d66fee626 # v7.4.1
with:
browser: ${{ matrix.browser }}
start: npm run start:local
wait-on: 'http://127.0.0.1:4200'
spec: projects/playground/e2e/integration/playground.cy.ts
config-file: cypress.config.js
install-command: npx cypress install
- name: Upload Cypress screenshots
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: cypress-screenshots-${{ matrix.browser }}-${{ github.run_id }}
path: projects/playground/e2e/screenshots
retention-days: 30
if-no-files-found: ignore