This commit addresses occasional pipeline failures caused by transient network errors during dependency installation with `npm ci`. It centralizes the logic for installing npm dependencies and introduces a retry mechanism. The new approach will attempt `npm ci` up to 5 times with a 5-second interval between each attempt, thereby increasing the resilience of CI/CD pipelines. This commit adds a new script `npm-install.js` with `npm run install-deps` command to centralize npm dependency installation process throughout the project. Separate testing of scripts to a separate workflow. It removes unused `install` dependency from `package.json`.
31 lines
752 B
YAML
31 lines
752 B
YAML
name: quality-checks
|
|
|
|
on: [ push, pull_request ]
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
lint-command:
|
|
- npm run lint:eslint
|
|
- npm run lint:yaml
|
|
- npm run lint:md
|
|
- npm run lint:md:relative-urls
|
|
- npm run lint:md:consistency
|
|
os: [ macos, ubuntu, windows ]
|
|
fail-fast: false # Still interested to see results from other combinations
|
|
steps:
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v2
|
|
-
|
|
name: Setup node
|
|
uses: ./.github/actions/setup-node
|
|
-
|
|
name: Install dependencies
|
|
uses: ./.github/actions/npm-install-dependencies
|
|
-
|
|
name: Lint
|
|
run: ${{ matrix.lint-command }}
|