From 97b41528739460b2e9e72e09000aded412418cb2 Mon Sep 17 00:00:00 2001 From: Ruy Adorno Date: Thu, 25 Mar 2021 00:45:30 -0400 Subject: add smoke tests Lightweight smoke test suite that runs common commands so that we can also have a holistic check during CI. PR-URL: https://github.com/npm/cli/pull/2959 Credit: @ruyadorno Close: #2959 Reviewed-by: @nlf --- .github/workflows/ci.yml | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to '.github') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 851b3fdcb..14f362b45 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,6 +37,48 @@ jobs: - name: Run linting run: node . run licenses + smoke-tests: + 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 + + 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@v1 + with: + node-version: ${{ matrix.node-version }} + + # Run the installer script + - name: Install dependencies + run: | + node . install --ignore-scripts --no-audit + node . rebuild + + # Run the smoke tests + - name: Run Smoke tests + run: node . run --ignore-scripts smoke-tests -- --no-check-coverage -t600 -Rbase -c + env: + DEPLOY_VERSION: testing + build: strategy: fail-fast: false -- cgit v1.2.3