Skip to content

Commit a59fd2c

Browse files
authored
deps: @npmcli/template-oss@3.2.2 (#4639)
- add some basic tests for docs - make dockhand script work on windows - cleanup main CI to match template-oss - add a git status check for cli ci tests - use resetdeps for ci steps
1 parent cc0a2ec commit a59fd2c

39 files changed

+303
-267
lines changed

.github/workflows/ci-docs.yml

+54-16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This file is automatically added by @npmcli/template-oss. Do not edit.
2+
13
name: CI - docs
24

35
on:
@@ -22,26 +24,62 @@ jobs:
2224
runs-on: ubuntu-latest
2325
steps:
2426
- uses: actions/checkout@v3
27+
- name: Setup git user
28+
run: |
29+
git config --global user.email "ops+npm-cli@npmjs.com"
30+
git config --global user.name "npm cli ops bot"
2531
- uses: actions/setup-node@v3
2632
with:
27-
node-version: 16.x
28-
- run: |
29-
node ./bin/npm-cli.js install --ignore-scripts --no-audit
30-
node ./bin/npm-cli.js rebuild
31-
- run: node ./bin/npm-cli.js run lint -w docs
32-
env:
33-
DEPLOY_VERSION: testing
33+
node-version: 16
34+
- name: Update npm to latest
35+
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
36+
- run: npm -v
37+
- run: npm i --ignore-scripts
38+
- run: npm run lint -w docs
3439

35-
check_docs:
36-
runs-on: ubuntu-latest
40+
test:
41+
strategy:
42+
fail-fast: false
43+
matrix:
44+
node-version:
45+
- 16
46+
platform:
47+
- os: ubuntu-latest
48+
shell: bash
49+
- os: macos-latest
50+
shell: bash
51+
- os: windows-latest
52+
shell: cmd
53+
runs-on: ${{ matrix.platform.os }}
54+
defaults:
55+
run:
56+
shell: ${{ matrix.platform.shell }}
3757
steps:
3858
- uses: actions/checkout@v3
59+
- name: Setup git user
60+
run: |
61+
git config --global user.email "ops+npm-cli@npmjs.com"
62+
git config --global user.name "npm cli ops bot"
3963
- uses: actions/setup-node@v3
4064
with:
41-
node-version: 16.x
42-
- run: |
43-
node ./bin/npm-cli.js install --ignore-scripts --no-audit
44-
- name: Rebuild the docs
45-
run: make freshdocs
46-
- name: Git should not be dirty
47-
run: node scripts/git-dirty.js
65+
node-version: ${{ matrix.node-version }}
66+
- name: Update to workable npm (windows)
67+
# node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows
68+
if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12.') || startsWith(matrix.node-version, '14.'))
69+
run: |
70+
curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz
71+
tar xf npm-7.5.4.tgz
72+
cd package
73+
node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz
74+
cd ..
75+
rmdir /s /q package
76+
- name: Update npm to 7
77+
# If we do test on npm 10 it needs npm7
78+
if: startsWith(matrix.node-version, '10.')
79+
run: npm i --prefer-online --no-fund --no-audit -g npm@7
80+
- name: Update npm to latest
81+
if: ${{ !startsWith(matrix.node-version, '10.') }}
82+
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
83+
- run: npm -v
84+
- run: npm i --ignore-scripts
85+
- run: npm test --ignore-scripts -w docs

.github/workflows/ci.yml

+47-82
Original file line numberDiff line numberDiff line change
@@ -1,149 +1,114 @@
1-
name: Node CI
1+
name: CI - cli
22

33
on:
4+
workflow_dispatch:
45
pull_request:
56
branches:
67
- '*'
78
push:
89
branches:
910
- latest
10-
workflow_dispatch:
1111

1212
jobs:
1313
lint:
1414
runs-on: ubuntu-latest
1515
steps:
16-
# Checkout the npm/cli repo
17-
- uses: actions/checkout@v2
18-
- name: Use Node.js 14.x
19-
uses: actions/setup-node@v2
16+
- uses: actions/checkout@v3
17+
- name: Use Node.js 16.x
18+
uses: actions/setup-node@v3
2019
with:
21-
node-version: 14.x
20+
node-version: 16.x
2221
cache: npm
23-
- name: Install dependencies
24-
run: |
25-
node ./bin/npm-cli.js install --ignore-scripts --no-audit
26-
node ./bin/npm-cli.js rebuild
27-
- name: Run linting
28-
run: node ./bin/npm-cli.js run posttest
29-
env:
30-
DEPLOY_VERSION: testing
22+
- run: node ./bin/npm-cli.js run resetdeps
23+
- run: node ./bin/npm-cli.js run lint
3124

3225
check_docs:
3326
runs-on: ubuntu-latest
3427
steps:
35-
- uses: actions/checkout@v2
36-
- name: Use Node.js 14.x
37-
uses: actions/setup-node@v2
28+
- uses: actions/checkout@v3
29+
- name: Use Node.js 16.x
30+
uses: actions/setup-node@v3
3831
with:
39-
node-version: 14.x
32+
node-version: 16.x
4033
cache: npm
41-
- name: Install dependencies
42-
run: |
43-
node ./bin/npm-cli.js install --ignore-scripts --no-audit
44-
- name: Rebuild the docs
45-
run: make freshdocs
46-
- name: Git should not be dirty
47-
run: node scripts/git-dirty.js
48-
34+
- run: make freshdocs
35+
- run: node scripts/git-dirty.js
4936

5037
licenses:
5138
runs-on: ubuntu-latest
5239
steps:
53-
# Checkout the npm/cli repo
54-
- uses: actions/checkout@v2
55-
- name: Use Node.js 14.x
56-
uses: actions/setup-node@v2
40+
- uses: actions/checkout@v3
41+
- name: Use Node.js 16.x
42+
uses: actions/setup-node@v3
5743
with:
58-
node-version: 14.x
44+
node-version: 16.x
5945
cache: npm
60-
- name: Install dependencies
61-
run: |
62-
node ./bin/npm-cli.js install --ignore-scripts --no-audit
63-
node ./bin/npm-cli.js rebuild
64-
- name: Validate licenses
65-
run: node ./bin/npm-cli.js run licenses
46+
- run: node ./bin/npm-cli.js run resetdeps
47+
- run: node ./bin/npm-cli.js run licenses
6648

6749
smoke-tests:
6850
strategy:
6951
fail-fast: false
7052
matrix:
71-
node-version: [12.x, 14.x, 16.x]
53+
node-version:
54+
- 12.x
55+
- 14.x
56+
- 16.x
7257
platform:
7358
- os: ubuntu-latest
7459
shell: bash
7560
- os: macos-latest
7661
shell: bash
7762
- os: windows-latest
78-
shell: bash
79-
- os: windows-latest
80-
shell: powershell
81-
63+
shell: cmd
8264
runs-on: ${{ matrix.platform.os }}
8365
defaults:
8466
run:
8567
shell: ${{ matrix.platform.shell }}
86-
8768
steps:
88-
# Checkout the npm/cli repo
89-
- uses: actions/checkout@v2
90-
91-
# Installs the specific version of Node.js
69+
- uses: actions/checkout@v3
9270
- name: Use Node.js ${{ matrix.node-version }}
93-
uses: actions/setup-node@v2
71+
uses: actions/setup-node@v3
9472
with:
9573
node-version: ${{ matrix.node-version }}
9674
cache: npm
97-
98-
# Run the installer script
99-
- name: Install dependencies
100-
run: |
101-
node ./bin/npm-cli.js install --ignore-scripts --no-audit
102-
node ./bin/npm-cli.js rebuild
103-
104-
# Run the smoke tests
105-
- name: Run Smoke tests
106-
run: node ./bin/npm-cli.js run --ignore-scripts smoke-tests -- --no-check-coverage -t600 -Rbase -c
107-
env:
108-
DEPLOY_VERSION: testing
75+
- run: node ./bin/npm-cli.js run resetdeps
76+
- run: node ./bin/npm-cli.js run smoke-tests --ignore-scripts
77+
- name: git status
78+
if: matrix.platform.os != 'windows-latest'
79+
run: node scripts/git-dirty.js
10980

11081
test:
11182
strategy:
11283
fail-fast: false
11384
matrix:
114-
node-version: ['12.13.0', 12.x, '14.15.0', 14.x, '16.0.0', 16.x]
85+
node-version:
86+
- 12.13.0
87+
- 12.x
88+
- 14.15.0
89+
- 14.x
90+
- 16.0.0
91+
- 16.x
11592
platform:
11693
- os: ubuntu-latest
11794
shell: bash
11895
- os: macos-latest
11996
shell: bash
12097
- os: windows-latest
121-
shell: bash
122-
- os: windows-latest
123-
shell: powershell
124-
98+
shell: cmd
12599
runs-on: ${{ matrix.platform.os }}
126100
defaults:
127101
run:
128102
shell: ${{ matrix.platform.shell }}
129-
130103
steps:
131-
# Checkout the npm/cli repo
132-
- uses: actions/checkout@v2
133-
134-
# Installs the specific version of Node.js
104+
- uses: actions/checkout@v3
135105
- name: Use Node.js ${{ matrix.node-version }}
136-
uses: actions/setup-node@v2
106+
uses: actions/setup-node@v3
137107
with:
138108
node-version: ${{ matrix.node-version }}
139109
cache: npm
140-
141-
# Run the installer script
142-
- name: Install dependencies
143-
run: |
144-
node ./bin/npm-cli.js install --ignore-scripts --no-audit
145-
node ./bin/npm-cli.js rebuild
146-
147-
# Run the tests
148-
- name: Run Tap tests
149-
run: node ./bin/npm-cli.js run test --ignore-scripts -- -t600 -Rbase -c
110+
- run: node ./bin/npm-cli.js run resetdeps
111+
- run: node ./bin/npm-cli.js run test --ignore-scripts
112+
- name: git status
113+
if: matrix.platform.os != 'windows-latest'
114+
run: node scripts/git-dirty.js

.github/workflows/release-please-libnpmaccess.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
with:
2020
release-type: node
2121
monorepo-tags: true
22-
paths: workspaces/libnpmaccess
22+
path: workspaces/libnpmaccess
2323
changelog-types: >
2424
[
2525
{"type":"feat","section":"Features","hidden":false},

.github/workflows/release-please-libnpmdiff.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
with:
2020
release-type: node
2121
monorepo-tags: true
22-
paths: workspaces/libnpmdiff
22+
path: workspaces/libnpmdiff
2323
changelog-types: >
2424
[
2525
{"type":"feat","section":"Features","hidden":false},

.github/workflows/release-please-libnpmexec.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
with:
2020
release-type: node
2121
monorepo-tags: true
22-
paths: workspaces/libnpmexec
22+
path: workspaces/libnpmexec
2323
changelog-types: >
2424
[
2525
{"type":"feat","section":"Features","hidden":false},

.github/workflows/release-please-libnpmfund.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
with:
2020
release-type: node
2121
monorepo-tags: true
22-
paths: workspaces/libnpmfund
22+
path: workspaces/libnpmfund
2323
changelog-types: >
2424
[
2525
{"type":"feat","section":"Features","hidden":false},

.github/workflows/release-please-libnpmhook.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
with:
2020
release-type: node
2121
monorepo-tags: true
22-
paths: workspaces/libnpmhook
22+
path: workspaces/libnpmhook
2323
changelog-types: >
2424
[
2525
{"type":"feat","section":"Features","hidden":false},

.github/workflows/release-please-libnpmorg.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
with:
2020
release-type: node
2121
monorepo-tags: true
22-
paths: workspaces/libnpmorg
22+
path: workspaces/libnpmorg
2323
changelog-types: >
2424
[
2525
{"type":"feat","section":"Features","hidden":false},

.github/workflows/release-please-libnpmpack.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
with:
2020
release-type: node
2121
monorepo-tags: true
22-
paths: workspaces/libnpmpack
22+
path: workspaces/libnpmpack
2323
changelog-types: >
2424
[
2525
{"type":"feat","section":"Features","hidden":false},

.github/workflows/release-please-libnpmpublish.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
with:
2020
release-type: node
2121
monorepo-tags: true
22-
paths: workspaces/libnpmpublish
22+
path: workspaces/libnpmpublish
2323
changelog-types: >
2424
[
2525
{"type":"feat","section":"Features","hidden":false},

.github/workflows/release-please-libnpmsearch.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
with:
2020
release-type: node
2121
monorepo-tags: true
22-
paths: workspaces/libnpmsearch
22+
path: workspaces/libnpmsearch
2323
changelog-types: >
2424
[
2525
{"type":"feat","section":"Features","hidden":false},

.github/workflows/release-please-libnpmteam.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
with:
2020
release-type: node
2121
monorepo-tags: true
22-
paths: workspaces/libnpmteam
22+
path: workspaces/libnpmteam
2323
changelog-types: >
2424
[
2525
{"type":"feat","section":"Features","hidden":false},

.github/workflows/release-please-libnpmversion.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
with:
2020
release-type: node
2121
monorepo-tags: true
22-
paths: workspaces/libnpmversion
22+
path: workspaces/libnpmversion
2323
changelog-types: >
2424
[
2525
{"type":"feat","section":"Features","hidden":false},

.github/workflows/release-please-npmcli-arborist.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
with:
2020
release-type: node
2121
monorepo-tags: true
22-
paths: workspaces/arborist
22+
path: workspaces/arborist
2323
changelog-types: >
2424
[
2525
{"type":"feat","section":"Features","hidden":false},

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
!/LICENSE
3030
!/make.bat
3131
!/Makefile
32-
!/netlify.toml
3332
!/package-lock.json
3433
!/package.json
3534
!/README.md

0 commit comments

Comments
 (0)