update workflow file #4
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: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
env: | |
NODE_VERSION: 20 | |
jobs: | |
linter: | |
runs-on: ubuntu-latest | |
name: Static Code Analysis | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run linting rules | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{env.NODE_VERSION}} | |
cache: "npm" | |
cache-dependency-path: | | |
catalog/package-lock.json | |
lambda/package-lock.json | |
- name: analyze in the catalog folder | |
working-directory: catalog | |
run: npm ci && npm run linter | |
- name: analyze in the lambda folder | |
working-directory: lambda | |
run: npm ci && npm run linter |