fix(ci): resolve crash due to NPM version issue #12
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Pull Request' | |
on: | |
pull_request: | |
types: [opened, reopened, synchronize] | |
env: | |
NPM_VERSION: 6 | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: [14, 16, 18, 20] | |
name: Node ${{ matrix.node }} | |
steps: | |
- name: 'Checkout latest code' | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Set up node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Install latest npm | |
run: | | |
npm install -g npm@$NPM_VERSION && | |
npm --version && | |
npm list -g --depth 0 | |
- name: Install dependencies | |
run: npm ci | |
- name: Install dependencies | |
run: npm ci | |
- name: Run tests | |
run: npm run test | |
lint: | |
name: 'ESLint' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout latest code | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Set up node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- name: Install dependencies | |
run: npm ci | |
- name: Run ESLint | |
run: npm run lint |