Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Fritz <fritzy@github.com>2021-11-16 21:27:55 +0300
committerNathan Fritz <fritzy@github.com>2021-11-18 22:43:26 +0300
commit44e39ce7042a162f53a708ee4660e84638a66f6b (patch)
tree79af3760604b7ce37e3c733a5aeb3726531ae9c6 /.github
parentea2906ca32bda348b2833458729dc52081d64cf2 (diff)
separate github actions for workspaces
PR-URL: https://github.com/npm/cli/pull/4050 Credit: @fritzy Close: #4050 Reviewed-by: @wraithgar PR-URL: https://github.com/npm/cli/pull/4050 Credit: @fritzy Close: #4050 Reviewed-by: @wraithgar
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/ci-docs.yml52
-rw-r--r--.github/workflows/ci-libnpmdiff.yml76
-rw-r--r--.github/workflows/ci.yml46
3 files changed, 131 insertions, 43 deletions
diff --git a/.github/workflows/ci-docs.yml b/.github/workflows/ci-docs.yml
new file mode 100644
index 000000000..67a075227
--- /dev/null
+++ b/.github/workflows/ci-docs.yml
@@ -0,0 +1,52 @@
+name: Node CI docs
+
+on:
+ pull_request:
+ paths:
+ - docs/**
+ branches:
+ - '*'
+ push:
+ paths:
+ - docs/**
+ branches:
+ - release-next
+ - 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
+ with:
+ node-version: 14.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 lint -w docs
+ env:
+ DEPLOY_VERSION: testing
+
+ check_docs:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Use Node.js 14.x
+ uses: actions/setup-node@v2
+ with:
+ node-version: 14.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
diff --git a/.github/workflows/ci-libnpmdiff.yml b/.github/workflows/ci-libnpmdiff.yml
new file mode 100644
index 000000000..5f8a20f64
--- /dev/null
+++ b/.github/workflows/ci-libnpmdiff.yml
@@ -0,0 +1,76 @@
+name: Node CI libnpmdiff
+
+on:
+ pull_request:
+ paths:
+ - workspaces/libnpmdiff/**
+ branches:
+ - '*'
+ push:
+ paths:
+ - workspaces/libnpmdiff/**
+ branches:
+ - release-next
+ - 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
+ with:
+ node-version: 14.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 -w libnpmdiff
+ env:
+ DEPLOY_VERSION: testing
+
+ test:
+ strategy:
+ fail-fast: false
+ matrix:
+ 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
+
+ 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
+ - name: Use Node.js ${{ matrix.node-version }}
+ uses: actions/setup-node@v2
+ 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, but not if we're just gonna do coveralls later anyway
+ - name: Run Tap tests
+ run: node ./bin/npm-cli.js run -w libnpmdiff --ignore-scripts test -- -t600 -Rbase -c
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 3fba2a3ba..473e30f37 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -8,6 +8,8 @@ on:
branches:
- release-next
- latest
+ workflow_dispatch:
+
jobs:
lint:
runs-on: ubuntu-latest
@@ -106,49 +108,7 @@ jobs:
env:
DEPLOY_VERSION: testing
- workspaces-tests:
- strategy:
- fail-fast: false
- matrix:
- 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
-
- 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
- - name: Use Node.js ${{ matrix.node-version }}
- uses: actions/setup-node@v2
- 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
-
- - name: Run workspaces tests
- run: node ./bin/npm-cli.js test -w ./packages -- --no-check-coverage -t600 -Rbase -c
- env:
- DEPLOY_VERSION: testing
-
- build:
+ test:
strategy:
fail-fast: false
matrix: