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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  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@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
  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