Skip to content

Commit f6fbb0f

Browse files
committed
Ensure playwright dependencies are installed
1 parent fa20829 commit f6fbb0f

File tree

1 file changed

+19
-10
lines changed

1 file changed

+19
-10
lines changed

.github/workflows/playwright-tests.yml

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ name: Playwright Tests
44
on:
55
push:
66
branches:
7-
- '**'
7+
- '**' # Run on every branch for every commit
88
pull_request:
99
branches:
10-
- '**'
10+
- '**' # Run on every pull request for any branch
1111

1212
jobs:
1313
test:
@@ -18,20 +18,26 @@ jobs:
1818
- name: Checkout repository
1919
uses: actions/checkout@v3
2020

21-
# Step 2: Set up JDK 17
21+
- name: Set up Node.js
22+
uses: actions/setup-node@v3
23+
with:
24+
node-version: '20'
25+
26+
# Step 2: Set up JDK 17 (adjust if you're using a different version)
2227
- name: Set up JDK 17
2328
uses: actions/setup-java@v3
2429
with:
2530
java-version: '17'
2631
distribution: 'adopt'
2732

2833
# Step 3: Install Maven 3.9.9
29-
- name: Install Maven 3.9.9
30-
run: |
31-
wget https://downloads.apache.org/maven/maven-3/3.9.9/binaries/apache-maven-3.9.9-bin.tar.gz
32-
tar -xvzf apache-maven-3.9.9-bin.tar.gz
33-
sudo mv apache-maven-3.9.9 /opt/maven
34-
echo "export PATH=/opt/maven/bin:$PATH" >> $GITHUB_ENV
34+
- name: Setup Maven Action
35+
36+
with:
37+
checkout-fetch-depth: 0
38+
java-version: 17
39+
java-distribution: temurin
40+
maven-version: 3.9.9
3541

3642
# Step 4: Verify Maven installation
3743
- name: Verify Maven version
@@ -46,6 +52,9 @@ jobs:
4652
restore-keys: |
4753
${{ runner.os }}-maven
4854
55+
- name: Install Playwright dependencies
56+
run: npx playwright install-deps
57+
4958
# Step 6: Run Maven to execute Playwright tests
5059
- name: Run Playwright Tests
51-
run: mvn verify
60+
run: mvn verify

0 commit comments

Comments
 (0)