Skip to content

Commit e3b1c1d

Browse files
committed
Update to github action
Signed-off-by: Ganesh Hubale <ganeshhubale03@gmail.com>
1 parent 1cd9bb9 commit e3b1c1d

File tree

2 files changed

+33
-44
lines changed

2 files changed

+33
-44
lines changed

.github/workflows/pull-request-tester.yaml

Lines changed: 0 additions & 27 deletions
This file was deleted.
Lines changed: 33 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,43 @@
1-
name: Regression tests
1+
name: Cypress Tests
2+
23
on:
34
push:
45
branches:
56
- master
6-
workflow_dispatch:
7-
# schedule:
8-
# - cron: "0 0 1 * *" // At 00:00 on day-of-month 1.
7+
pull_request:
98

109
jobs:
11-
tests:
12-
name: Regression test suite
10+
cypress:
11+
name: Run Cypress Tests
1312
runs-on: ubuntu-latest
13+
1414
steps:
15-
- name: Checkout to master branch
16-
uses: actions/checkout@v2
17-
- name: Cypress run
18-
uses: cypress-io/github-action@v2
15+
# Step 1: Checkout the code
16+
- name: Checkout repository
17+
uses: actions/checkout@v3
18+
19+
# Step 2: Set up Node.js environment
20+
- name: Set up Node.js
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version: 18
24+
25+
# Step 3: Install dependencies
26+
- name: Install dependencies
27+
run: npm ci
28+
29+
# Step 4: Run Cypress tests
30+
- name: Run Cypress
31+
uses: cypress-io/github-action@v5
1932
with:
20-
record: false
21-
start: npx echo "Starting regression tests"
22-
config: pageLoadTimeout=100000,retries=2,video=false
2333
browser: chrome
24-
env:
25-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26-
CYPRESS_username: ${{ secrets.USER }}
27-
CYPRESS_password: ${{ secrets.PASS }}
34+
headless: true
35+
video: false
36+
37+
# Step 5: Upload artifacts (optional, for videos/screenshots)
38+
- name: Upload artifacts
39+
if: always() # Ensure artifacts are uploaded even if the tests fail
40+
uses: actions/upload-artifact@v3
41+
with:
42+
name: cypress-artifacts
43+
path: cypress/videos/

0 commit comments

Comments
 (0)