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:
authorJordan Harband <ljharb@gmail.com>2021-02-12 01:29:50 +0300
committerGar <gar+gh@danger.computer>2021-02-12 20:22:06 +0300
commitabcc96a204ed581fc7cd603f47cdca0afe299530 (patch)
tree377b852c3168578f0ce3ff3a8d352cf13564fd9f /.github
parent3a159d27e976933098ec18fa9c3e474c85b5b332 (diff)
[tests] separate tests from linting and license validation
PR-URL: https://github.com/npm/cli/pull/2682 Credit: @ljharb Close: #2682 Reviewed-by: @wraithgar
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/ci.yml57
1 files changed, 43 insertions, 14 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 6cbf5d3a4..939f295e9 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -3,20 +3,54 @@ name: Node CI
on: [push, pull_request]
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@v1
+ with:
+ node-version: 14.x
+ - name: Install dependencies
+ run: |
+ node . install --ignore-scripts --no-audit
+ node . rebuild
+ - name: Run linting
+ run: node . run posttest
+ env:
+ DEPLOY_VERSION: testing
+
+ 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@v1
+ with:
+ node-version: 14.x
+ - name: Install dependencies
+ run: |
+ node . install --ignore-scripts --no-audit
+ node . rebuild
+ - name: Run linting
+ run: node . run licenses
+
build:
strategy:
fail-fast: false
matrix:
node-version: [10.x, 12.x, 14.x]
platform:
- - os: ubuntu-latest
- shell: bash
- - os: macos-latest
- shell: bash
- - os: windows-latest
- shell: bash
- - os: windows-latest
- shell: powershell
+ - 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:
@@ -42,7 +76,7 @@ jobs:
# Run the tests, but not if we're just gonna do coveralls later anyway
- name: Run Tap tests
if: matrix.platform.os != 'ubuntu-latest' || matrix.node-version != '12.x'
- run: node . test -- -t600 -Rbase -c
+ run: node . run --ignore-scripts test -- -t600 -Rbase -c
env:
DEPLOY_VERSION: testing
@@ -58,8 +92,3 @@ jobs:
# - name: Run sudo tests on Linux
# if: matrix.os == 'ubuntu-latest'
# run: sudo PATH=$PATH $(which node) . test -- --coverage --timeout 600
-
- # no need to check licenses everywhere, they don't change between versions
- - name: Validate licenses
- if: matrix.os == 'ubuntu-latest' && matrix.node-version == '12.x'
- run: node . run licenses