diff options
author | Luke Karrys <luke@lukekarrys.com> | 2022-03-30 18:32:22 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-30 18:32:22 +0300 |
commit | a59fd2cb863245fce56f96c90ac854e62c5c4d6f (patch) | |
tree | f1421497144abae5a2d0190f9d06adc3e4b5da36 /.github | |
parent | cc0a2ec9999b956ea654deaf68fd49ae4bf1a1c0 (diff) |
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
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/ci-docs.yml | 70 | ||||
-rw-r--r-- | .github/workflows/ci.yml | 129 | ||||
-rw-r--r-- | .github/workflows/release-please-libnpmaccess.yml | 2 | ||||
-rw-r--r-- | .github/workflows/release-please-libnpmdiff.yml | 2 | ||||
-rw-r--r-- | .github/workflows/release-please-libnpmexec.yml | 2 | ||||
-rw-r--r-- | .github/workflows/release-please-libnpmfund.yml | 2 | ||||
-rw-r--r-- | .github/workflows/release-please-libnpmhook.yml | 2 | ||||
-rw-r--r-- | .github/workflows/release-please-libnpmorg.yml | 2 | ||||
-rw-r--r-- | .github/workflows/release-please-libnpmpack.yml | 2 | ||||
-rw-r--r-- | .github/workflows/release-please-libnpmpublish.yml | 2 | ||||
-rw-r--r-- | .github/workflows/release-please-libnpmsearch.yml | 2 | ||||
-rw-r--r-- | .github/workflows/release-please-libnpmteam.yml | 2 | ||||
-rw-r--r-- | .github/workflows/release-please-libnpmversion.yml | 2 | ||||
-rw-r--r-- | .github/workflows/release-please-npmcli-arborist.yml | 2 |
14 files changed, 113 insertions, 110 deletions
diff --git a/.github/workflows/ci-docs.yml b/.github/workflows/ci-docs.yml index c7e9cf2ba..68c3b649e 100644 --- a/.github/workflows/ci-docs.yml +++ b/.github/workflows/ci-docs.yml @@ -1,3 +1,5 @@ +# This file is automatically added by @npmcli/template-oss. Do not edit. + name: CI - docs on: @@ -22,26 +24,62 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - name: Setup git user + run: | + git config --global user.email "ops+npm-cli@npmjs.com" + git config --global user.name "npm cli ops bot" - uses: actions/setup-node@v3 with: - node-version: 16.x - - run: | - node ./bin/npm-cli.js install --ignore-scripts --no-audit - node ./bin/npm-cli.js rebuild - - run: node ./bin/npm-cli.js run lint -w docs - env: - DEPLOY_VERSION: testing + node-version: 16 + - name: Update npm to latest + run: npm i --prefer-online --no-fund --no-audit -g npm@latest + - run: npm -v + - run: npm i --ignore-scripts + - run: npm run lint -w docs - check_docs: - runs-on: ubuntu-latest + test: + strategy: + fail-fast: false + matrix: + node-version: + - 16 + platform: + - os: ubuntu-latest + shell: bash + - os: macos-latest + shell: bash + - os: windows-latest + shell: cmd + runs-on: ${{ matrix.platform.os }} + defaults: + run: + shell: ${{ matrix.platform.shell }} steps: - uses: actions/checkout@v3 + - name: Setup git user + run: | + git config --global user.email "ops+npm-cli@npmjs.com" + git config --global user.name "npm cli ops bot" - uses: actions/setup-node@v3 with: - node-version: 16.x - - run: | - node ./bin/npm-cli.js install --ignore-scripts --no-audit - - name: Rebuild the docs - run: make freshdocs - - name: Git should not be dirty - run: node scripts/git-dirty.js + node-version: ${{ matrix.node-version }} + - name: Update to workable npm (windows) + # node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows + if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12.') || startsWith(matrix.node-version, '14.')) + run: | + curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz + tar xf npm-7.5.4.tgz + cd package + node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz + cd .. + rmdir /s /q package + - name: Update npm to 7 + # If we do test on npm 10 it needs npm7 + if: startsWith(matrix.node-version, '10.') + run: npm i --prefer-online --no-fund --no-audit -g npm@7 + - name: Update npm to latest + if: ${{ !startsWith(matrix.node-version, '10.') }} + run: npm i --prefer-online --no-fund --no-audit -g npm@latest + - run: npm -v + - run: npm i --ignore-scripts + - run: npm test --ignore-scripts -w docs diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8df4fdc48..e8b6886e3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,149 +1,114 @@ -name: Node CI +name: CI - cli on: + workflow_dispatch: pull_request: branches: - '*' push: branches: - latest - workflow_dispatch: jobs: lint: runs-on: ubuntu-latest steps: - # Checkout the npm/cli repo - - uses: actions/checkout@v2 - - name: Use Node.js 14.x - uses: actions/setup-node@v2 + - uses: actions/checkout@v3 + - name: Use Node.js 16.x + uses: actions/setup-node@v3 with: - node-version: 14.x + node-version: 16.x cache: npm - - name: Install dependencies - run: | - node ./bin/npm-cli.js install --ignore-scripts --no-audit - node ./bin/npm-cli.js rebuild - - name: Run linting - run: node ./bin/npm-cli.js run posttest - env: - DEPLOY_VERSION: testing + - run: node ./bin/npm-cli.js run resetdeps + - run: node ./bin/npm-cli.js run lint check_docs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Use Node.js 14.x - uses: actions/setup-node@v2 + - uses: actions/checkout@v3 + - name: Use Node.js 16.x + uses: actions/setup-node@v3 with: - node-version: 14.x + node-version: 16.x cache: npm - - name: Install dependencies - run: | - node ./bin/npm-cli.js install --ignore-scripts --no-audit - - name: Rebuild the docs - run: make freshdocs - - name: Git should not be dirty - run: node scripts/git-dirty.js - + - run: make freshdocs + - run: node scripts/git-dirty.js licenses: runs-on: ubuntu-latest steps: - # Checkout the npm/cli repo - - uses: actions/checkout@v2 - - name: Use Node.js 14.x - uses: actions/setup-node@v2 + - uses: actions/checkout@v3 + - name: Use Node.js 16.x + uses: actions/setup-node@v3 with: - node-version: 14.x + node-version: 16.x cache: npm - - name: Install dependencies - run: | - node ./bin/npm-cli.js install --ignore-scripts --no-audit - node ./bin/npm-cli.js rebuild - - name: Validate licenses - run: node ./bin/npm-cli.js run licenses + - run: node ./bin/npm-cli.js run resetdeps + - run: node ./bin/npm-cli.js run licenses smoke-tests: strategy: fail-fast: false matrix: - node-version: [12.x, 14.x, 16.x] + node-version: + - 12.x + - 14.x + - 16.x platform: - os: ubuntu-latest shell: bash - os: macos-latest shell: bash - os: windows-latest - shell: bash - - os: windows-latest - shell: powershell - + shell: cmd runs-on: ${{ matrix.platform.os }} defaults: run: shell: ${{ matrix.platform.shell }} - steps: - # Checkout the npm/cli repo - - uses: actions/checkout@v2 - - # Installs the specific version of Node.js + - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} cache: npm - - # Run the installer script - - name: Install dependencies - run: | - node ./bin/npm-cli.js install --ignore-scripts --no-audit - node ./bin/npm-cli.js rebuild - - # Run the smoke tests - - name: Run Smoke tests - run: node ./bin/npm-cli.js run --ignore-scripts smoke-tests -- --no-check-coverage -t600 -Rbase -c - env: - DEPLOY_VERSION: testing + - run: node ./bin/npm-cli.js run resetdeps + - run: node ./bin/npm-cli.js run smoke-tests --ignore-scripts + - name: git status + if: matrix.platform.os != 'windows-latest' + run: node scripts/git-dirty.js test: strategy: fail-fast: false matrix: - node-version: ['12.13.0', 12.x, '14.15.0', 14.x, '16.0.0', 16.x] + node-version: + - 12.13.0 + - 12.x + - 14.15.0 + - 14.x + - 16.0.0 + - 16.x platform: - os: ubuntu-latest shell: bash - os: macos-latest shell: bash - os: windows-latest - shell: bash - - os: windows-latest - shell: powershell - + shell: cmd runs-on: ${{ matrix.platform.os }} defaults: run: shell: ${{ matrix.platform.shell }} - steps: - # Checkout the npm/cli repo - - uses: actions/checkout@v2 - - # Installs the specific version of Node.js + - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} cache: npm - - # Run the installer script - - name: Install dependencies - run: | - node ./bin/npm-cli.js install --ignore-scripts --no-audit - node ./bin/npm-cli.js rebuild - - # Run the tests - - name: Run Tap tests - run: node ./bin/npm-cli.js run test --ignore-scripts -- -t600 -Rbase -c + - run: node ./bin/npm-cli.js run resetdeps + - run: node ./bin/npm-cli.js run test --ignore-scripts + - name: git status + if: matrix.platform.os != 'windows-latest' + run: node scripts/git-dirty.js diff --git a/.github/workflows/release-please-libnpmaccess.yml b/.github/workflows/release-please-libnpmaccess.yml index 566092621..ae798bcb8 100644 --- a/.github/workflows/release-please-libnpmaccess.yml +++ b/.github/workflows/release-please-libnpmaccess.yml @@ -19,7 +19,7 @@ jobs: with: release-type: node monorepo-tags: true - paths: workspaces/libnpmaccess + path: workspaces/libnpmaccess changelog-types: > [ {"type":"feat","section":"Features","hidden":false}, diff --git a/.github/workflows/release-please-libnpmdiff.yml b/.github/workflows/release-please-libnpmdiff.yml index 5f64a0668..4f9a0673a 100644 --- a/.github/workflows/release-please-libnpmdiff.yml +++ b/.github/workflows/release-please-libnpmdiff.yml @@ -19,7 +19,7 @@ jobs: with: release-type: node monorepo-tags: true - paths: workspaces/libnpmdiff + path: workspaces/libnpmdiff changelog-types: > [ {"type":"feat","section":"Features","hidden":false}, diff --git a/.github/workflows/release-please-libnpmexec.yml b/.github/workflows/release-please-libnpmexec.yml index 5467b3db3..7beb1148a 100644 --- a/.github/workflows/release-please-libnpmexec.yml +++ b/.github/workflows/release-please-libnpmexec.yml @@ -19,7 +19,7 @@ jobs: with: release-type: node monorepo-tags: true - paths: workspaces/libnpmexec + path: workspaces/libnpmexec changelog-types: > [ {"type":"feat","section":"Features","hidden":false}, diff --git a/.github/workflows/release-please-libnpmfund.yml b/.github/workflows/release-please-libnpmfund.yml index b87ea3b85..c89a94ecf 100644 --- a/.github/workflows/release-please-libnpmfund.yml +++ b/.github/workflows/release-please-libnpmfund.yml @@ -19,7 +19,7 @@ jobs: with: release-type: node monorepo-tags: true - paths: workspaces/libnpmfund + path: workspaces/libnpmfund changelog-types: > [ {"type":"feat","section":"Features","hidden":false}, diff --git a/.github/workflows/release-please-libnpmhook.yml b/.github/workflows/release-please-libnpmhook.yml index 761fbc9d1..a5863b1cf 100644 --- a/.github/workflows/release-please-libnpmhook.yml +++ b/.github/workflows/release-please-libnpmhook.yml @@ -19,7 +19,7 @@ jobs: with: release-type: node monorepo-tags: true - paths: workspaces/libnpmhook + path: workspaces/libnpmhook changelog-types: > [ {"type":"feat","section":"Features","hidden":false}, diff --git a/.github/workflows/release-please-libnpmorg.yml b/.github/workflows/release-please-libnpmorg.yml index 7841c0ef5..9352c64e2 100644 --- a/.github/workflows/release-please-libnpmorg.yml +++ b/.github/workflows/release-please-libnpmorg.yml @@ -19,7 +19,7 @@ jobs: with: release-type: node monorepo-tags: true - paths: workspaces/libnpmorg + path: workspaces/libnpmorg changelog-types: > [ {"type":"feat","section":"Features","hidden":false}, diff --git a/.github/workflows/release-please-libnpmpack.yml b/.github/workflows/release-please-libnpmpack.yml index 236f1e0b8..669bc7162 100644 --- a/.github/workflows/release-please-libnpmpack.yml +++ b/.github/workflows/release-please-libnpmpack.yml @@ -19,7 +19,7 @@ jobs: with: release-type: node monorepo-tags: true - paths: workspaces/libnpmpack + path: workspaces/libnpmpack changelog-types: > [ {"type":"feat","section":"Features","hidden":false}, diff --git a/.github/workflows/release-please-libnpmpublish.yml b/.github/workflows/release-please-libnpmpublish.yml index 2d7240dfa..82b4ad0e2 100644 --- a/.github/workflows/release-please-libnpmpublish.yml +++ b/.github/workflows/release-please-libnpmpublish.yml @@ -19,7 +19,7 @@ jobs: with: release-type: node monorepo-tags: true - paths: workspaces/libnpmpublish + path: workspaces/libnpmpublish changelog-types: > [ {"type":"feat","section":"Features","hidden":false}, diff --git a/.github/workflows/release-please-libnpmsearch.yml b/.github/workflows/release-please-libnpmsearch.yml index f22825d46..9c22260a9 100644 --- a/.github/workflows/release-please-libnpmsearch.yml +++ b/.github/workflows/release-please-libnpmsearch.yml @@ -19,7 +19,7 @@ jobs: with: release-type: node monorepo-tags: true - paths: workspaces/libnpmsearch + path: workspaces/libnpmsearch changelog-types: > [ {"type":"feat","section":"Features","hidden":false}, diff --git a/.github/workflows/release-please-libnpmteam.yml b/.github/workflows/release-please-libnpmteam.yml index 9fae3a057..5437a9e2c 100644 --- a/.github/workflows/release-please-libnpmteam.yml +++ b/.github/workflows/release-please-libnpmteam.yml @@ -19,7 +19,7 @@ jobs: with: release-type: node monorepo-tags: true - paths: workspaces/libnpmteam + path: workspaces/libnpmteam changelog-types: > [ {"type":"feat","section":"Features","hidden":false}, diff --git a/.github/workflows/release-please-libnpmversion.yml b/.github/workflows/release-please-libnpmversion.yml index ee1e11e50..322568707 100644 --- a/.github/workflows/release-please-libnpmversion.yml +++ b/.github/workflows/release-please-libnpmversion.yml @@ -19,7 +19,7 @@ jobs: with: release-type: node monorepo-tags: true - paths: workspaces/libnpmversion + path: workspaces/libnpmversion changelog-types: > [ {"type":"feat","section":"Features","hidden":false}, diff --git a/.github/workflows/release-please-npmcli-arborist.yml b/.github/workflows/release-please-npmcli-arborist.yml index 84a42eca0..651ea71b2 100644 --- a/.github/workflows/release-please-npmcli-arborist.yml +++ b/.github/workflows/release-please-npmcli-arborist.yml @@ -19,7 +19,7 @@ jobs: with: release-type: node monorepo-tags: true - paths: workspaces/arborist + path: workspaces/arborist changelog-types: > [ {"type":"feat","section":"Features","hidden":false}, |