Skip to content

Commit f613370

Browse files
committed
2 parents 76e5842 + e5a9c4d commit f613370

File tree

5 files changed

+46
-38
lines changed

5 files changed

+46
-38
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: Release
22
on:
33
workflow_dispatch:
4-
# push:
5-
# branches:
6-
# - main
4+
push:
5+
branches:
6+
- main
77

88
jobs:
99
release:

.github/workflows/test.yml

Lines changed: 36 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
name: Test
1+
name: Playwright Test
2+
23
on:
34
workflow_dispatch:
45
push:
5-
tags:
6-
- v*
7-
branches: [ main ]
6+
tags:
7+
- v*
8+
branches: [main]
89
pull_request:
9-
branches: [ main ]
10+
branches: [main]
1011

1112
jobs:
1213
build:
1314
strategy:
15+
fail-fast: false
1416
matrix:
1517
os: [macos-latest, windows-latest, ubuntu-latest]
1618
node-version: [20.x, 22.x]
@@ -19,26 +21,32 @@ jobs:
1921
runs-on: ${{ matrix.os }}
2022

2123
steps:
22-
- name: Checkout repository
23-
uses: actions/checkout@v4
24-
25-
- name: Install Go
26-
uses: actions/setup-go@v5
27-
with:
28-
go-version: ">1.0.0"
29-
30-
- name: Setup Node.js ${{ matrix.node-version }}
31-
uses: actions/setup-node@v4
32-
with:
33-
node-version: ${{ matrix.node-version }}
34-
cache: 'npm'
35-
cache-dependency-path: '**/package-lock.json'
36-
37-
- name: Perform clean install of npm
38-
run: npm ci
39-
40-
- name: Run tests
41-
run: npm run test
42-
43-
- name: Run Playwright tests
44-
run: npm run test:playwright
24+
- name: Checkout repository
25+
uses: actions/checkout@v4
26+
with:
27+
fetch-depth: 1 # Fetch only the latest commit for faster builds
28+
29+
- name: Install Go
30+
uses: actions/setup-go@v5
31+
with:
32+
go-version: ">1.0.0"
33+
cache: true
34+
35+
- name: Setup Node.js ${{ matrix.node-version }}
36+
uses: actions/setup-node@v4
37+
with:
38+
node-version: ${{ matrix.node-version }}
39+
cache: 'npm'
40+
cache-dependency-path: '**/package-lock.json'
41+
42+
- name: Perform clean install of npm
43+
run: npm ci
44+
45+
- name: Install Playwright Browsers
46+
run: npx playwright install
47+
48+
- name: Run tests
49+
run: npm run test
50+
51+
- name: Run Playwright tests
52+
run: npm run test:playwright

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@d-oit/hinode-mod-slideshow-gallery",
3-
"version": "0.0.1-rc1",
3+
"version": "1.0.0",
44
"description": "Hugo Slideshow Gallery module compatible for Hinode",
55
"keywords": [
66
"hugo",
@@ -47,10 +47,9 @@
4747
"cz-conventional-changelog": "^3.3.0",
4848
"hugo-bin": "^0.137.1",
4949
"husky": "^9.1.7",
50-
"playwright": "^1.20.0",
50+
"playwright": "^1.49.1",
5151
"rimraf": "^6.0.1",
52-
"semantic-release": "^24.2.0",
53-
"playwright": "^1.49.1"
52+
"semantic-release": "^24.2.0"
5453
},
5554
"hugo-bin": {
5655
"buildTags": "extended"

playwright.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,10 @@ export default defineConfig({
6262
command: 'npm run start',
6363
url: baseURL,
6464
reuseExistingServer: process.env.REUSE_SERVER === 'true',
65-
timeout: 120000, // Add timeout of 2 minutes
65+
timeout: 60000,
6666
stdout: 'pipe', // Pipe the output
6767
stderr: 'pipe', // Pipe the error output
68+
reporter: 'list',
6869
// Add a pattern to wait for
6970
readyPattern: 'Web Server is available at', // Adjust this to match Hugo's actual output
7071
}

0 commit comments

Comments
 (0)