Skip to content

Commit 2f89853

Browse files
committed
feat: implement lint stylelint action
Signed-off-by: David Lima <[email protected]>
1 parent 14be4e1 commit 2f89853

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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+
9+
name: Lint stylelint
10+
11+
on: pull_request
12+
13+
permissions:
14+
contents: read
15+
16+
concurrency:
17+
group: lint-stylelint-${{ github.head_ref || github.run_id }}
18+
cancel-in-progress: true
19+
20+
jobs:
21+
lint:
22+
runs-on: ubuntu-latest
23+
24+
name: stylelint
25+
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
29+
with:
30+
persist-credentials: false
31+
32+
- name: Read package.json node and npm engines version
33+
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
34+
id: versions
35+
with:
36+
fallbackNode: "^20"
37+
fallbackNpm: "^10"
38+
39+
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
40+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
41+
with:
42+
node-version: ${{ steps.versions.outputs.nodeVersion }}
43+
44+
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
45+
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
46+
47+
- name: Install dependencies
48+
env:
49+
CYPRESS_INSTALL_BINARY: 0
50+
run: npm ci
51+
52+
- name: Lint
53+
run: npm run stylelint

0 commit comments

Comments
 (0)