diff --git a/.github/workflows/ci-docs.yml b/.github/workflows/ci-docs.yml index b22eb08f3ff5e..ac92fead94a8b 100644 --- a/.github/workflows/ci-docs.yml +++ b/.github/workflows/ci-docs.yml @@ -85,5 +85,7 @@ jobs: - name: Link if: matrix run: node . link -f --ignore-scripts + - name: Rebuild cmark-gfm + run: node . rebuild cmark-gfm - name: Test run: node . test --ignore-scripts -w docs diff --git a/.github/workflows/ci-libnpmaccess.yml b/.github/workflows/ci-libnpmaccess.yml index 538f468534daf..4b30b54b1ef95 100644 --- a/.github/workflows/ci-libnpmaccess.yml +++ b/.github/workflows/ci-libnpmaccess.yml @@ -90,5 +90,7 @@ jobs: - name: Link if: matrix run: node . link -f --ignore-scripts + - name: Rebuild cmark-gfm + run: node . rebuild cmark-gfm - name: Test run: node . test --ignore-scripts -w libnpmaccess diff --git a/.github/workflows/ci-libnpmdiff.yml b/.github/workflows/ci-libnpmdiff.yml index 06efb53b9988c..f1a8fd846d2c0 100644 --- a/.github/workflows/ci-libnpmdiff.yml +++ b/.github/workflows/ci-libnpmdiff.yml @@ -90,5 +90,7 @@ jobs: - name: Link if: matrix run: node . link -f --ignore-scripts + - name: Rebuild cmark-gfm + run: node . rebuild cmark-gfm - name: Test run: node . test --ignore-scripts -w libnpmdiff diff --git a/.github/workflows/ci-libnpmexec.yml b/.github/workflows/ci-libnpmexec.yml index 14e0dd8383ccc..eccbd943d6a32 100644 --- a/.github/workflows/ci-libnpmexec.yml +++ b/.github/workflows/ci-libnpmexec.yml @@ -90,5 +90,7 @@ jobs: - name: Link if: matrix run: node . link -f --ignore-scripts + - name: Rebuild cmark-gfm + run: node . rebuild cmark-gfm - name: Test run: node . test --ignore-scripts -w libnpmexec diff --git a/.github/workflows/ci-libnpmfund.yml b/.github/workflows/ci-libnpmfund.yml index ec57e387474ec..acd8a5e00afd3 100644 --- a/.github/workflows/ci-libnpmfund.yml +++ b/.github/workflows/ci-libnpmfund.yml @@ -90,5 +90,7 @@ jobs: - name: Link if: matrix run: node . link -f --ignore-scripts + - name: Rebuild cmark-gfm + run: node . rebuild cmark-gfm - name: Test run: node . test --ignore-scripts -w libnpmfund diff --git a/.github/workflows/ci-libnpmhook.yml b/.github/workflows/ci-libnpmhook.yml index 70ea396c6dc49..e2f6eb8c263a6 100644 --- a/.github/workflows/ci-libnpmhook.yml +++ b/.github/workflows/ci-libnpmhook.yml @@ -90,5 +90,7 @@ jobs: - name: Link if: matrix run: node . link -f --ignore-scripts + - name: Rebuild cmark-gfm + run: node . rebuild cmark-gfm - name: Test run: node . test --ignore-scripts -w libnpmhook diff --git a/.github/workflows/ci-libnpmorg.yml b/.github/workflows/ci-libnpmorg.yml index b02097c6a28ec..05ab19a41f0b9 100644 --- a/.github/workflows/ci-libnpmorg.yml +++ b/.github/workflows/ci-libnpmorg.yml @@ -90,5 +90,7 @@ jobs: - name: Link if: matrix run: node . link -f --ignore-scripts + - name: Rebuild cmark-gfm + run: node . rebuild cmark-gfm - name: Test run: node . test --ignore-scripts -w libnpmorg diff --git a/.github/workflows/ci-libnpmpack.yml b/.github/workflows/ci-libnpmpack.yml index 6bbb81aa318b6..12a17c594a7b3 100644 --- a/.github/workflows/ci-libnpmpack.yml +++ b/.github/workflows/ci-libnpmpack.yml @@ -90,5 +90,7 @@ jobs: - name: Link if: matrix run: node . link -f --ignore-scripts + - name: Rebuild cmark-gfm + run: node . rebuild cmark-gfm - name: Test run: node . test --ignore-scripts -w libnpmpack diff --git a/.github/workflows/ci-libnpmpublish.yml b/.github/workflows/ci-libnpmpublish.yml index 4673ab5ba02f1..ad28f216d86d7 100644 --- a/.github/workflows/ci-libnpmpublish.yml +++ b/.github/workflows/ci-libnpmpublish.yml @@ -90,5 +90,7 @@ jobs: - name: Link if: matrix run: node . link -f --ignore-scripts + - name: Rebuild cmark-gfm + run: node . rebuild cmark-gfm - name: Test run: node . test --ignore-scripts -w libnpmpublish diff --git a/.github/workflows/ci-libnpmsearch.yml b/.github/workflows/ci-libnpmsearch.yml index 753f723546e42..51243c33b4034 100644 --- a/.github/workflows/ci-libnpmsearch.yml +++ b/.github/workflows/ci-libnpmsearch.yml @@ -90,5 +90,7 @@ jobs: - name: Link if: matrix run: node . link -f --ignore-scripts + - name: Rebuild cmark-gfm + run: node . rebuild cmark-gfm - name: Test run: node . test --ignore-scripts -w libnpmsearch diff --git a/.github/workflows/ci-libnpmteam.yml b/.github/workflows/ci-libnpmteam.yml index 6abdc44267b2c..d69e4bdb1e8fd 100644 --- a/.github/workflows/ci-libnpmteam.yml +++ b/.github/workflows/ci-libnpmteam.yml @@ -90,5 +90,7 @@ jobs: - name: Link if: matrix run: node . link -f --ignore-scripts + - name: Rebuild cmark-gfm + run: node . rebuild cmark-gfm - name: Test run: node . test --ignore-scripts -w libnpmteam diff --git a/.github/workflows/ci-libnpmversion.yml b/.github/workflows/ci-libnpmversion.yml index c8f73603e7745..23ec19dd12541 100644 --- a/.github/workflows/ci-libnpmversion.yml +++ b/.github/workflows/ci-libnpmversion.yml @@ -90,5 +90,7 @@ jobs: - name: Link if: matrix run: node . link -f --ignore-scripts + - name: Rebuild cmark-gfm + run: node . rebuild cmark-gfm - name: Test run: node . test --ignore-scripts -w libnpmversion diff --git a/.github/workflows/ci-npmcli-arborist.yml b/.github/workflows/ci-npmcli-arborist.yml index e34099cee31fc..07caf1ec63339 100644 --- a/.github/workflows/ci-npmcli-arborist.yml +++ b/.github/workflows/ci-npmcli-arborist.yml @@ -90,5 +90,7 @@ jobs: - name: Link if: matrix run: node . link -f --ignore-scripts + - name: Rebuild cmark-gfm + run: node . rebuild cmark-gfm - name: Test run: node . test --ignore-scripts -w @npmcli/arborist diff --git a/.github/workflows/ci-release.yml b/.github/workflows/ci-release.yml index 41442f9f2ad8d..3aa582dbcb84c 100644 --- a/.github/workflows/ci-release.yml +++ b/.github/workflows/ci-release.yml @@ -126,6 +126,8 @@ jobs: - name: Link if: matrix run: node . link -f --ignore-scripts + - name: Rebuild cmark-gfm + run: node . rebuild cmark-gfm - name: Test run: node . test --ignore-scripts -ws -iwr --if-present - name: Conclude Check diff --git a/.github/workflows/ci-smoke-tests.yml b/.github/workflows/ci-smoke-tests.yml index 9251e0cbf8aef..29033c6c462ad 100644 --- a/.github/workflows/ci-smoke-tests.yml +++ b/.github/workflows/ci-smoke-tests.yml @@ -90,5 +90,7 @@ jobs: - name: Link if: matrix run: node . link -f --ignore-scripts + - name: Rebuild cmark-gfm + run: node . rebuild cmark-gfm - name: Test run: node . test --ignore-scripts -w smoke-tests diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f0725516211d9..c13550bd14a5d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -164,6 +164,8 @@ jobs: - name: Link if: matrix run: node . link -f --ignore-scripts + - name: Rebuild cmark-gfm + run: node . rebuild cmark-gfm - name: Test run: node . test --ignore-scripts -iwr - name: Check Git Status diff --git a/docs/test/index.js b/docs/test/index.js index 1eac4438cf8a7..17710c00a0339 100644 --- a/docs/test/index.js +++ b/docs/test/index.js @@ -9,19 +9,11 @@ const output = join(cwd, 'output') const rmOutput = () => fs.rm(output, { recursive: true, force: true }).catch(() => {}) -const spawnNpm = (cmd, ...args) => { - // remove npm config when spawning so config set by test commands don't interfere - const env = Object.entries(process.env) - .filter(([k]) => k.toLowerCase() !== 'npm_config_ignore_scripts') - - return spawn(which(cmd), args, { - env: Object.fromEntries(env), - stdioString: true, - cwd, - }) -} +const spawnNpm = (cmd, ...args) => spawn(which(cmd), args, { + stdioString: true, + cwd, +}) -t.before(() => spawnNpm('node', '..', 'rebuild', 'cmark-gfm')) t.beforeEach(() => rmOutput()) t.test('docs', async (t) => { diff --git a/scripts/template-oss/_step-test.yml b/scripts/template-oss/_step-test.yml index 8df6696aedc01..195dc2991e6c3 100644 --- a/scripts/template-oss/_step-test.yml +++ b/scripts/template-oss/_step-test.yml @@ -3,5 +3,7 @@ - name: Link if: matrix run: {{ rootNpmPath }} link -f --ignore-scripts +- name: Rebuild cmark-gfm + run: {{ rootNpmPath }} rebuild cmark-gfm - name: Test run: {{ rootNpmPath }} test --ignore-scripts {{~#if jobRunFlags}} {{ jobRunFlags }}{{/if}}