Skip to content

Commit 6b8a76b

Browse files
committed
ci(test-publish): wait verdaccio healthcheck on Windows
1 parent 632e29b commit 6b8a76b

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

.github/workflows/test-publish.yaml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ on:
2323
- 'LICENSE'
2424

2525
jobs:
26-
2726
test:
2827
runs-on: ubuntu-latest
2928

@@ -52,7 +51,7 @@ jobs:
5251
run: pnpm eslint .
5352

5453
- name: Lint Markdown
55-
run: pnpm markdownlint .
54+
run: pnpm markdownlint .
5655

5756
e2etest:
5857
needs: test
@@ -62,7 +61,7 @@ jobs:
6261
matrix:
6362
node-version: [18, 20, 22]
6463
# [REF]: https://github.com/actions/runner-images
65-
# Q. Why `macos-latest-large`(x86-64) instead of `macos-latest`(arm64)?
64+
# Q. Why `macos-latest-large`(x86-64) instead of `macos-latest`(arm64)?
6665
# A. Apple silicon does not support 'nested virtualization' yet,
6766
# though support *will* be added from M3 + macOS 15.
6867
# [REF]: https://github.com/douglascamata/setup-docker-macos-action
@@ -74,7 +73,7 @@ jobs:
7473
- name: Set up pnpm
7574
uses: pnpm/action-setup@v2
7675
with:
77-
run_install: false # For cache
76+
run_install: false # For cache
7877

7978
- name: Use Node.js ${{ matrix.node-version }}
8079
uses: actions/setup-node@v3
@@ -89,19 +88,28 @@ jobs:
8988
# Currently, docker is not preinstalled on macos runner images.
9089
if: startsWith(matrix.os, 'macos')
9190
uses: douglascamata/setup-docker-macos-action@v1-alpha
92-
93-
- name: Run Local Npm Registry (Verdaccio) On Linux and macOS
91+
92+
- name: Run Local Npm Registry (Verdaccio) On Linux and macOS
9493
if: startsWith(matrix.os, 'windows') == false
9594
# verdaccio is private npm registry. [link](https://github.com/verdaccio/verdaccio/)
9695
run: docker compose -f verdaccio/docker-compose.yaml up --wait
9796

9897
- name: Run Local Npm Registry (Verdaccio) On Windows
9998
if: startsWith(matrix.os, 'windows')
10099
# Q. Why not using docker?
101-
# A. [REF](https://github.com/verdaccio/verdaccio/issues/4808)
100+
# A. [REF](https://github.com/verdaccio/verdaccio/issues/4808)
102101
run: |
103102
pnpm add --global forever verdaccio
104-
forever start verdaccio --config ./verdaccio/config.yaml
103+
forever start verdaccio --config ./verdaccio/config.yaml
104+
105+
- name: Health Check Local Npm Registry On Windows
106+
if: startsWith(matrix.os, 'windows')
107+
uses: jtalk/url-health-check-action@v4
108+
with:
109+
# Check the following URLs one by one sequentially
110+
url: http://localhost:4873
111+
retry-delay: 10s
112+
max-attempts: 100
105113

106114
- name: Publish To Local NPM Registry
107115
run: |
@@ -135,7 +143,7 @@ jobs:
135143
- name: Set up pnpm
136144
uses: pnpm/action-setup@v2
137145
with:
138-
run_install: false # For cache
146+
run_install: false # For cache
139147

140148
- name: Set Up Node.js
141149
uses: actions/setup-node@v3

0 commit comments

Comments
 (0)