lint.yml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. name: "Lint BetterYTM"
  2. on:
  3. workflow_dispatch:
  4. push:
  5. branches: [develop]
  6. jobs:
  7. lint:
  8. name: Lint
  9. runs-on: ubuntu-latest
  10. timeout-minutes: 8
  11. strategy:
  12. matrix:
  13. node-version: [22.x]
  14. env:
  15. CI: "true"
  16. STORE_PATH: ""
  17. PNPM_VERSION: 9
  18. steps:
  19. - name: Check out the repository
  20. uses: actions/checkout@v3
  21. - name: Set up Node.js v${{ matrix.node-version }}
  22. uses: actions/setup-node@v3
  23. with:
  24. node-version: ${{ matrix.node-version }}
  25. - name: Set up pnpm
  26. uses: pnpm/action-setup@v4
  27. with:
  28. version: ${{ env.PNPM_VERSION }}
  29. run_install: false
  30. - name: Get pnpm store directory
  31. shell: bash
  32. run: |
  33. echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
  34. - name: Setup pnpm cache
  35. uses: actions/cache@v4
  36. with:
  37. path: ${{ env.STORE_PATH }}
  38. key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
  39. restore-keys: |
  40. ${{ runner.os }}-pnpm-store-
  41. - name: Install dependencies
  42. run: pnpm install
  43. - name: Build with tsc & lint
  44. run: npm run lint