1
0

lint-eslint.yml 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. # This workflow is provided via the organization template repository
  2. #
  3. # https://github.com/nextcloud/.github
  4. # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
  5. name: Lint
  6. on:
  7. pull_request:
  8. push:
  9. branches:
  10. - master
  11. - stable*
  12. jobs:
  13. lint:
  14. runs-on: ubuntu-latest
  15. name: eslint
  16. steps:
  17. - name: Checkout
  18. uses: actions/checkout@v2
  19. - name: Read package.json node and npm engines version
  20. uses: skjnldsv/read-package-engines-version-actions@v1.1
  21. id: versions
  22. with:
  23. fallbackNode: '^12'
  24. fallbackNpm: '^6'
  25. - name: Set up node ${{ steps.versions.outputs.nodeVersion }}
  26. uses: actions/setup-node@v2
  27. with:
  28. node-version: ${{ steps.versions.outputs.nodeVersion }}
  29. - name: Set up npm ${{ steps.versions.outputs.npmVersion }}
  30. run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
  31. - name: Install dependencies
  32. run: npm ci
  33. - name: Lint
  34. run: npm run lint