Skip to content

npm-ls demo results #49

npm-ls demo results

npm-ls demo results #49

# For details of what checks are run for PRs please refer below
# docs: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
name: npm-ls demo results
on:
workflow_dispatch:
env:
DEMO_ROOT_DIR: demo
RESULTS_DIR: CI_results
RESULTS_ARTIFACT: npm-ls-results
jobs:
demo-results:
name: ${{ matrix.subject }} npm${{ matrix.npm-version }} node${{ matrix.node-version }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false # gather all the results !
matrix:
subject:
# - bundled-dependencies
# - dev-dependencies
# - juice-shop
# - local-dependencies
# - local-workspaces
- package-integrity
# - package-with-build-id
npm-version:
## see https://www.npmjs.com/package/npm?activeTab=versions
## see also: https://github.com/npm/cli/releases
- '10' # https://github.com/npm/cli/releases/tag/v10.0.0-pre.0
- '9' # Current
- '8' # Latest
- '7' # Legacy
- '6' # Legacy
node-version:
## action based on https://github.com/actions/node-versions/releases
## see also: https://nodejs.org/en/about/releases/
- '20' # Current
- '18' # Active LTS
- '16'
- '14'
os:
- ubuntu-latest
- windows-latest
- macos-latest
exclude:
- # npm10 requires node ^18.17.0 || >=20.5.0
npm-version: '10'
node-version: '16'
- # npm10 requires node ^18.17.0 || >=20.5.0
npm-version: '10'
node-version: '14'
- # npm9 upgrade/install failed on node14
npm-version: '9'
node-version: '14'
- # juice-shop might not be node14 compatible
subject: juice-shop
node-version: '14'
- # juice-shop might not be npm6 compatible
subject: juice-shop
npm-version: '6'
- # workspaces are a feature of NPM since 7.0
subject: local-workspaces
npm-version: '6'
timeout-minutes: 10 # this is a large matrix, just don't waste time!
steps:
- name: Checkout
# see https://github.com/actions/checkout
uses: actions/checkout@v4
- name: prepare output
run: |
mkdir -p '${{ env.RESULTS_DIR }}'
echo 'OUT_FILE_PREFIX=${{ env.RESULTS_DIR }}/npm-ls_npm${{ matrix.npm-version }}_node${{ matrix.node-version }}_${{ matrix.os }}' >> $GITHUB_ENV
working-directory: ${{ env.DEMO_ROOT_DIR}}/${{ matrix.subject }}
shell: bash # don't want to write tht code twice, windows and unix-like
- name: Setup Node.js ${{ matrix.node-version }}
# see https://github.com/actions/setup-node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
check-latest: true
- name: up-/down-grade npm to ${{ matrix.npm-version }}
run: npm i -g 'npm@${{ matrix.npm-version }}'
- name: report versions
run: |
node --version
npm --version
- name: setup demo
run: npm i --no-audit --no-fund
working-directory: ${{ env.DEMO_ROOT_DIR }}/${{ matrix.subject }}/project
- name: npm-ls ls --json --all --long
# important: the command in use is the same used by the internal builders of this project
run: >
npm --prefix project
ls --json --all --long
2> ${{ env.OUT_FILE_PREFIX }}.err.log
1> ${{ env.OUT_FILE_PREFIX }}.json
working-directory: ${{ env.DEMO_ROOT_DIR}}/${{ matrix.subject }}
- name: Artifact RESULTS
# see https://github.com/actions/upload-artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.RESULTS_ARTIFACT }}
path: ${{ env.DEMO_ROOT_DIR}}/*/${{ env.RESULTS_DIR }}
if-no-files-found: error