123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- name: "Lint and Analyze Code"
- on:
- push:
- branches: [main, develop]
- pull_request:
- branches: [main]
- jobs:
- lint:
- name: Lint Code
- runs-on: ubuntu-latest
- strategy:
- matrix:
- node-version: [22.x]
- steps:
- - uses: actions/checkout@v4
- - uses: actions/setup-node@v4
- with:
- node-version: ${{ matrix.node-version }}
- - name: Install dependencies
- run: npm ci
- - name: Lint
- run: npm run lint
- analyze:
- name: Analyze Code
- runs-on: ubuntu-latest
- permissions:
- actions: read
- contents: read
- security-events: write
- strategy:
- matrix:
- language: ["javascript-typescript"]
- # CodeQL supports "c-cpp", "csharp", "go", "java-kotlin", "javascript-typescript", "python", "ruby", "swift"
- # Learn more:
- # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
- steps:
- - uses: actions/checkout@v4
- with:
- submodules: recursive
- - name: Initialize CodeQL
- uses: github/codeql-action/init@v3
- with:
- languages: ${{ matrix.language }}
- - name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v3
|