linter.yml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. name: Lint Code
  2. on:
  3. push:
  4. branches:
  5. - main
  6. pull_request:
  7. branches:
  8. - main
  9. jobs:
  10. build:
  11. name: Lint Code
  12. runs-on: ubuntu-latest
  13. steps:
  14. - name: Checkout repository
  15. uses: actions/checkout@v3
  16. - name: Install Node.js
  17. uses: actions/setup-node@v3
  18. with:
  19. node-version: 18
  20. - uses: pnpm/action-setup@v2
  21. name: Install pnpm
  22. id: pnpm-install
  23. with:
  24. version: 8.6.10
  25. run_install: false
  26. - name: Get pnpm store directory
  27. id: pnpm-cache
  28. shell: bash
  29. run: |
  30. echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
  31. - uses: actions/cache@v3
  32. name: Setup pnpm cache
  33. with:
  34. path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
  35. key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
  36. restore-keys: |
  37. ${{ runner.os }}-pnpm-store-
  38. - name: Start Lint Code
  39. run: |
  40. pnpm install --no-frozen-lockfile
  41. pnpm lint
  42. pnpm typecheck
  43. env:
  44. VALIDATE_ALL_CODEBASE: false
  45. DEFAULT_BRANCH: main
  46. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}