1
0

lint-and-analyze.yml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. name: "Lint and Analyze Code"
  2. on:
  3. push:
  4. branches: [main, develop]
  5. pull_request:
  6. branches: [main]
  7. jobs:
  8. lint:
  9. name: Lint Code
  10. runs-on: ubuntu-latest
  11. strategy:
  12. matrix:
  13. node-version: [22.x]
  14. steps:
  15. - uses: actions/checkout@v4
  16. - uses: actions/setup-node@v4
  17. with:
  18. node-version: ${{ matrix.node-version }}
  19. - name: Install dependencies
  20. run: npm ci
  21. - name: Lint
  22. run: npm run lint
  23. analyze:
  24. name: Analyze Code
  25. runs-on: ubuntu-latest
  26. permissions:
  27. actions: read
  28. contents: read
  29. security-events: write
  30. strategy:
  31. matrix:
  32. language: ["javascript-typescript"]
  33. # CodeQL supports "c-cpp", "csharp", "go", "java-kotlin", "javascript-typescript", "python", "ruby", "swift"
  34. # Learn more:
  35. # 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
  36. steps:
  37. - uses: actions/checkout@v4
  38. with:
  39. submodules: recursive
  40. - name: Initialize CodeQL
  41. uses: github/codeql-action/init@v3
  42. with:
  43. languages: ${{ matrix.language }}
  44. - name: Perform CodeQL Analysis
  45. uses: github/codeql-action/analyze@v3