Deployment #3
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: Lint scraper and run prettier check | |
on: | |
pull_request: | |
branches: ["main"] | |
paths: | |
- "scraper/**" | |
workflow_dispatch: | |
defaults: | |
run: | |
working-directory: "scraper" | |
env: | |
NODE_VERSION: 18 | |
PACKAGE_LOCK: scraper/package-lock.json | |
jobs: | |
lint: | |
name: Lint with eslint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: "npm" | |
cache-dependency-path: ${{ env.PACKAGE_LOCK }} | |
- name: Clean install dependencies | |
run: npm ci | |
- name: Lint | |
run: npm run lint | |
prettier-check: | |
name: Prettier check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: "npm" | |
cache-dependency-path: ${{ env.PACKAGE_LOCK }} | |
- name: Clean install dependencies | |
run: npm ci | |
- name: Run prettier check | |
run: npm run prettier-check |