chore: dedupe and update npm dependencies #1968
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: CI Test | |
on: | |
pull_request: | |
branches: [master] | |
repository_dispatch: | |
types: [ci-test] | |
workflow_dispatch: # for manual testing | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
# setup | |
- uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm ci | |
# test code | |
- name: Run tests | |
run: npm test | |
# generate and lint types | |
- name: Generate types | |
run: npm start -- --cache-discovery-json ${{ runner.temp }} | |
- name: Lint types | |
id: lint | |
run: npm run lint | |
env: | |
GAPI_MAX_PARALLEL: 3 | |
# upload failed type for investigation | |
- name: Copy discovery service response | |
if: failure() | |
run: cp ${{ runner.temp }}/${{ steps.lint.outputs.FAILED_TYPE }}.json types/${{ steps.lint.outputs.FAILED_TYPE }} | |
- name: Upload failed type | |
uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: ${{ steps.lint.outputs.FAILED_TYPE }} | |
path: types/${{ steps.lint.outputs.FAILED_TYPE }} |