Skip to content

Commit

Permalink
add smoke tests
Browse files Browse the repository at this point in the history
Lightweight smoke test suite that runs common commands so that we can
also have a holistic check during CI.
  • Loading branch information
ruyadorno committed Mar 25, 2021
1 parent 2b3d1f9 commit 248602b
Show file tree
Hide file tree
Showing 13 changed files with 1,889 additions and 1 deletion.
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,48 @@ jobs:
- name: Run linting
run: node . run licenses

smoke-tests:
strategy:
fail-fast: false
matrix:
node-version: ['10.1', 10.x, '12.1', 12.x, '14.1', 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
Expand Down
4 changes: 4 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,7 @@ docs/template.html
Session.vim
.nyc_output
/.editorconfig

# don't ship smoke tests
smoke-tests/
tap-snapshots/smoke-tests-index.js-TAP.test.js
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,8 @@
"lint": "npm run eslint -- test/lib test/bin \"lib/**/*.js\"",
"lintfix": "npm run lint -- --fix",
"prelint": "rimraf test/npm_cache*",
"resetdeps": "bash scripts/resetdeps.sh"
"resetdeps": "bash scripts/resetdeps.sh",
"smoke-tests": "tap smoke-tests/index.js"
},
"//": [
"XXX temporarily only run unit tests while v7 beta is in progress",
Expand Down
Loading

0 comments on commit 248602b

Please sign in to comment.