lint.yml 923 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. name: Lint
  2. on:
  3. push:
  4. branches:
  5. - master
  6. - v4-dev
  7. pull_request:
  8. branches:
  9. - "**"
  10. env:
  11. FORCE_COLOR: 2
  12. NODE: 16.x
  13. jobs:
  14. run:
  15. runs-on: ubuntu-latest
  16. steps:
  17. - name: Clone repository
  18. uses: actions/checkout@v2
  19. - name: Set up Node.js
  20. uses: actions/setup-node@v2
  21. with:
  22. node-version: "${{ env.NODE }}"
  23. - name: Set up npm cache
  24. uses: actions/cache@v2
  25. with:
  26. path: ~/.npm
  27. key: ${{ runner.os }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}}
  28. restore-keys: |
  29. ${{ runner.os }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
  30. ${{ runner.os }}-node-v${{ env.NODE }}-
  31. - name: Install npm dependencies
  32. run: npm ci
  33. - name: Run lint
  34. run: npm run lint