Skip to content

Commit 5790d75

Browse files
committed
ci: build and serve before testing
1 parent a25bf79 commit 5790d75

3 files changed

Lines changed: 16 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,16 @@ jobs:
101101
- name: Install dependencies
102102
run: npm ci
103103

104+
- name: Checkout Node.js source
105+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
106+
with:
107+
repository: nodejs/node
108+
sparse-checkout: doc/api/assert.md
109+
path: node
110+
111+
- name: Build docs
112+
run: npx doc-kit generate -t web -i "./node/doc/api/assert.md" -o out
113+
104114
- name: Install Playwright browsers
105115
run: npx playwright install --with-deps
106116

eslint.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default defineConfig([
1313
ignores: ['out/', 'src/generators/api-links/__tests__/fixtures/'],
1414
},
1515
{
16-
files: ['**/*.{mjs,jsx}'],
16+
files: ['**/*.{mjs,jsx,js}'],
1717
plugins: { jsdoc },
1818
languageOptions: {
1919
ecmaVersion: 'latest',

playwright.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,10 @@ export default defineConfig({
55
use: {
66
baseURL: 'http://localhost:3000',
77
},
8+
webServer: {
9+
command: 'npx serve out',
10+
url: 'http://localhost:3000',
11+
reuseExistingServer: !process.env.CI,
12+
},
813
projects: [{ name: 'chromium', use: { ...devices['Desktop Chrome'] } }],
914
});

0 commit comments

Comments
 (0)