Skip to content

Commit 723a2fd

Browse files
committed
Updated nightly build script
1 parent 2491cbf commit 723a2fd

File tree

2 files changed

+88
-59
lines changed

2 files changed

+88
-59
lines changed

.github/workflows/daily-branch-verification.yml

Lines changed: 0 additions & 59 deletions
This file was deleted.
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: Nightly Build
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *' # Runs daily at midnight UTC
6+
workflow_dispatch: # Allows manual triggering of the workflow
7+
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
branch:
15+
- main
16+
- sample-code/start-here
17+
- sample-code/module-3-my-first-playwright-test
18+
- sample-code/module-4-interacting-with-elements
19+
- sample-code/module-5-refactoring
20+
- sample-code/module-6-browser-options
21+
- sample-code/module-7-browser-contexts
22+
- sample-code/module-8-live-coding-demo
23+
- sample-code/module-8-locators
24+
- sample-code/module-9-forms
25+
- sample-code/module-10-assertions
26+
- sample-code/module-11-waits
27+
- sample-code/module-12-api-interactions
28+
- sample-code/module-12-mocking-api-calls
29+
- sample-code/module-13-page-objects
30+
- sample-code/module-14-allure-reporting
31+
- sample-code/module-14-organizing-your-tests
32+
- sample-code/module-14-tracing
33+
- sample-code/module-15-parallel-execution
34+
- sample-code/module-15-parallel-execution-annotated
35+
- sample-code/module-16-allure-reporting
36+
- sample-code/module-17-cucumber
37+
- sample-code/module-20-docker-start
38+
- sample-code/module-20-docker
39+
- sample-code/end-to-end
40+
steps:
41+
# Step 1: Check out the repository code for the specific branch
42+
- name: Checkout repository
43+
uses: actions/checkout@v3
44+
with:
45+
ref: ${{ matrix.branch }}
46+
47+
# Step 2: Set up Node.js
48+
- name: Set up Node.js
49+
uses: actions/setup-node@v3
50+
with:
51+
node-version: '20'
52+
53+
# Step 3: Set up JDK 17
54+
- name: Set up JDK 17
55+
uses: actions/setup-java@v3
56+
with:
57+
java-version: '17'
58+
distribution: 'adopt'
59+
60+
# Step 4: Install Maven 3.9.9
61+
- name: Setup Maven Action
62+
63+
with:
64+
checkout-fetch-depth: 0
65+
java-version: 17
66+
java-distribution: temurin
67+
maven-version: 3.9.9
68+
69+
# Step 5: Verify Maven installation
70+
- name: Verify Maven version
71+
run: mvn --version
72+
73+
# Step 6: Cache Maven dependencies
74+
- name: Cache Maven dependencies
75+
uses: actions/cache@v3
76+
with:
77+
path: ~/.m2
78+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
79+
restore-keys: |
80+
${{ runner.os }}-maven
81+
82+
# Step 7: Install Playwright dependencies
83+
- name: Install Playwright dependencies
84+
run: npx playwright install-deps
85+
86+
# Step 8: Run Maven to execute Playwright tests
87+
- name: Run Playwright Tests
88+
run: mvn verify

0 commit comments

Comments
 (0)