-
Notifications
You must be signed in to change notification settings - Fork 2
49 lines (39 loc) · 1.3 KB
/
01_ui_tests_chrome.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
47
48
49
# This GitHub Actions workflow is designed to execute Cypress tests using Chrome on various events
# such as manual trigger, push to the master branch, or pull requests to the master branch.
name: 01_Pre-defined browser Chrome
on:
# Manual Trigger with pre-defined browser Chrome
workflow_dispatch:
# Trigger on push to the main branch
push:
branches:
- main
# Trigger on pull request to the main branch
pull_request:
branches:
- main
jobs:
ui_tests_chrome:
# Define the machine on which tests will execute
runs-on: ubuntu-latest
steps:
# Step 1: Checking out the code from the GitHub repository to the machine (ubuntu-latest)
- name: Checkout code
uses: actions/checkout@v2
# Step 2: Installing Node.js
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: 16
# Step 3: Installing dependencies required for Cypress
- name: Install dependencies
run: npm ci
# Step 4: Run Cypress tests on Chrome browser
- name: Run Cypress UI tests
run: npm run cy:tests:CHROME
# Step 5: Upload test reports as artifacts
- name: Upload Reports
uses: actions/upload-artifact@v2
with:
name: UI Tests Report
path: cypress/reports