feature: Search #26
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: Node.js CI | |
on: pull_request | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
env: | |
DATOCMS_READONLY_API_TOKEN: ${{ secrets.DATOCMS_READONLY_API_TOKEN }} | |
DATOCMS_API_TOKEN: '' # required but unused in this workflow | |
HEAD_START_PREVIEW_SECRET: '' # required but unused in this workflow | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: ".nvmrc" | |
- name: Use dependencies cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.npm | |
key: npm-${{ hashFiles('package-lock.json') }} | |
restore-keys: npm- | |
- name: Install dependencies | |
run: npm ci --ignore-scripts --no-audit --no-fund | |
- name: Prepare setup | |
run: npm run prep | |
# eslint is fast, run it first to fail fast | |
- name: Lint other code files | |
run: npm run lint:eslint -- --max-warnings 0 | |
# astro check finds more errors, but is slower, so run it last | |
- name: Lint Astro files | |
run: npm run lint:astro -- --minimumSeverity warning |