2024-04-25 08:03:54 +00:00
|
|
|
# This workflow is provided via the organization template repository
|
|
|
|
#
|
|
|
|
# https://github.com/nextcloud/.github
|
|
|
|
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
|
2024-07-13 08:15:40 +00:00
|
|
|
#
|
|
|
|
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
# SPDX-License-Identifier: MIT
|
2024-04-25 08:03:54 +00:00
|
|
|
|
|
|
|
name: Lint stylelint
|
|
|
|
|
|
|
|
on: pull_request
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: lint-stylelint-${{ github.head_ref || github.run_id }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
lint:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
name: stylelint
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2024-07-13 08:15:40 +00:00
|
|
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
2024-04-25 08:03:54 +00:00
|
|
|
|
|
|
|
- name: Read package.json node and npm engines version
|
2024-07-13 08:15:40 +00:00
|
|
|
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
|
2024-04-25 08:03:54 +00:00
|
|
|
id: versions
|
|
|
|
with:
|
|
|
|
fallbackNode: '^20'
|
|
|
|
fallbackNpm: '^10'
|
|
|
|
|
|
|
|
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
|
|
|
|
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
|
|
|
|
with:
|
|
|
|
node-version: ${{ steps.versions.outputs.nodeVersion }}
|
|
|
|
|
|
|
|
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
|
2024-07-13 08:15:40 +00:00
|
|
|
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
|
2024-04-25 08:03:54 +00:00
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
env:
|
|
|
|
CYPRESS_INSTALL_BINARY: 0
|
|
|
|
run: npm ci
|
|
|
|
|
|
|
|
- name: Lint
|
|
|
|
run: npm run stylelint
|