diff options
author | Luke Karrys <luke@lukekarrys.com> | 2022-09-22 02:17:01 +0300 |
---|---|---|
committer | Luke Karrys <luke@lukekarrys.com> | 2022-09-22 02:29:34 +0300 |
commit | a1ef180380f1b4f55cd3dfe468d23a658b114e6d (patch) | |
tree | 68d32d33bce27acb74592e755d5f6d03cc21cd36 | |
parent | 9f5e6bd7a22f4fbe29ae1b57fb07d38fec8458db (diff) |
chore(ci): rebuild cmark-gfm only before tests
-rw-r--r-- | .github/workflows/ci-docs.yml | 2 | ||||
-rw-r--r-- | .github/workflows/ci-libnpmaccess.yml | 2 | ||||
-rw-r--r-- | .github/workflows/ci-libnpmdiff.yml | 2 | ||||
-rw-r--r-- | .github/workflows/ci-libnpmexec.yml | 2 | ||||
-rw-r--r-- | .github/workflows/ci-libnpmfund.yml | 2 | ||||
-rw-r--r-- | .github/workflows/ci-libnpmhook.yml | 2 | ||||
-rw-r--r-- | .github/workflows/ci-libnpmorg.yml | 2 | ||||
-rw-r--r-- | .github/workflows/ci-libnpmpack.yml | 2 | ||||
-rw-r--r-- | .github/workflows/ci-libnpmpublish.yml | 2 | ||||
-rw-r--r-- | .github/workflows/ci-libnpmsearch.yml | 2 | ||||
-rw-r--r-- | .github/workflows/ci-libnpmteam.yml | 2 | ||||
-rw-r--r-- | .github/workflows/ci-libnpmversion.yml | 2 | ||||
-rw-r--r-- | .github/workflows/ci-npmcli-arborist.yml | 2 | ||||
-rw-r--r-- | .github/workflows/ci-release.yml | 2 | ||||
-rw-r--r-- | .github/workflows/ci-smoke-tests.yml | 2 | ||||
-rw-r--r-- | .github/workflows/ci.yml | 2 | ||||
-rw-r--r-- | docs/test/index.js | 16 | ||||
-rw-r--r-- | scripts/template-oss/_step-test.yml | 2 |
18 files changed, 38 insertions, 12 deletions
diff --git a/.github/workflows/ci-docs.yml b/.github/workflows/ci-docs.yml index b22eb08f3..ac92fead9 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 538f46853..4b30b54b1 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 06efb53b9..f1a8fd846 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 14e0dd838..eccbd943d 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 ec57e3874..acd8a5e00 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 70ea396c6..e2f6eb8c2 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 b02097c6a..05ab19a41 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 6bbb81aa3..12a17c594 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 4673ab5ba..ad28f216d 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 753f72354..51243c33b 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 6abdc4426..d69e4bdb1 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 c8f73603e..23ec19dd1 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 e34099cee..07caf1ec6 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 41442f9f2..3aa582dbc 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 9251e0cbf..29033c6c4 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 f07255162..c13550bd1 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 1eac4438c..17710c00a 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 8df6696ae..195dc2991 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}} |