-
Notifications
You must be signed in to change notification settings - Fork 2
85 lines (72 loc) · 2.76 KB
/
browser_test.yml
File metadata and controls
85 lines (72 loc) · 2.76 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
name: browser-type-check
#on: [push]
on: [pull_request]
jobs:
cypress-run:
runs-on: self-hosted
strategy:
fail-fast: false
matrix:
browser: [ firefox, chrome-for-testing, edge ] #chrome beta causing issues
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Extract Branch Name and Set Test Run Name
id: set-test-run-name
run: |
BRANCH_NAME=$(echo "${{ github.ref }}" | awk -F'/' '{print $3}')
echo "::set-output name=TEST_RUN_NAME::${{ matrix.browser }}-${{ github.workflow }}—$BRANCH_NAME"
- name: Setup Edge
if: ${{ startsWith(matrix.browser, 'edge') }}
id: setup-edge
uses: browser-actions/setup-edge@v1
- name: Print Edge location
if: ${{ startsWith(matrix.browser, 'edge') }}
run: cat ${{ steps.setup-edge.outputs.edge-path }}
- name: Setup Chrome
if: ${{ startsWith(matrix.browser, 'chrome') }}
uses: browser-actions/setup-chrome@v2
with:
install-dependencies: true
- name: Setup Firefox
if: ${{ startsWith(matrix.browser, 'firefox') }}
uses: browser-actions/setup-firefox@v1
- name: Install node version 24
uses: actions/setup-node@v3
with:
node-version: '24'
- name: Install root dependencies
run: npm install
- name: Install test dependencies
run: npm install
working-directory: ./test
- name: Cypress run chrome or firefox
if: ${{ matrix.browser == 'chrome-for-testing' || startsWith(matrix.browser, 'firefox') }}
uses: cypress-io/github-action@v6
with:
quiet: true
working-directory: ./test
spec: cypress/e2e/test-spec/quick-test_*
browser: ${{ matrix.browser }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PROJECT_TOKEN: ${{ secrets.DEV_EXAMPLE_7 }}
TEST_RUN_NAME: ${{ steps.set-test-run-name.outputs.TEST_RUN_NAME }}
SBVT_SCM_BRANCH: ${{ github.head_ref || github.ref_name }}
SBVT_SCM_COMMIT_ID: ${{ github.sha }}
DEBUG: TRUE
- name: Cypress run edge
if: ${{ startsWith(matrix.browser, 'edge') }}
uses: cypress-io/github-action@v6
with:
quiet: true
working-directory: ./test
spec: cypress/e2e/test-spec/quick-test_*
browser: ${{ steps.setup-edge.outputs.edge-path }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PROJECT_TOKEN: ${{ secrets.DEV_EXAMPLE_7 }}
TEST_RUN_NAME: ${{ steps.set-test-run-name.outputs.TEST_RUN_NAME }}
SBVT_SCM_BRANCH: ${{ github.head_ref || github.ref_name }}
SBVT_SCM_COMMIT_ID: ${{ github.sha }}
DEBUG: TRUE