lint-stylelint.yml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. #
  6. # SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
  7. # SPDX-License-Identifier: MIT
  8. name: Lint stylelint
  9. on: pull_request
  10. permissions:
  11. contents: read
  12. concurrency:
  13. group: lint-stylelint-${{ github.head_ref || github.run_id }}
  14. cancel-in-progress: true
  15. jobs:
  16. lint:
  17. runs-on: ubuntu-latest
  18. name: stylelint
  19. steps:
  20. - name: Checkout
  21. uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
  22. - name: Read package.json node and npm engines version
  23. uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
  24. id: versions
  25. with:
  26. fallbackNode: '^20'
  27. fallbackNpm: '^10'
  28. - name: Set up node ${{ steps.versions.outputs.nodeVersion }}
  29. uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
  30. with:
  31. node-version: ${{ steps.versions.outputs.nodeVersion }}
  32. - name: Set up npm ${{ steps.versions.outputs.npmVersion }}
  33. run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
  34. - name: Install dependencies
  35. env:
  36. CYPRESS_INSTALL_BINARY: 0
  37. run: npm ci
  38. - name: Lint
  39. run: npm run stylelint