about summary refs log tree commit diff
path: root/.github/workflows
diff options
context:
space:
mode:
authorNick Schonning <nschonni@gmail.com>2023-01-29 18:23:52 -0500
committerGitHub <noreply@github.com>2023-01-30 00:23:52 +0100
commit4917e38d94ad8dcd89069dc2eb5d544a73098010 (patch)
treed33c7156e310ca1a069ffeff2c6ee0465d8987c1 /.github/workflows
parentd9088ef3272421a9267467fb95674d4b4afb38ab (diff)
Separate Stylelint from Superlinter (#23303)
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/lint-css.yml48
-rw-r--r--.github/workflows/linter.yml13
2 files changed, 48 insertions, 13 deletions
diff --git a/.github/workflows/lint-css.yml b/.github/workflows/lint-css.yml
new file mode 100644
index 000000000..431b88e8d
--- /dev/null
+++ b/.github/workflows/lint-css.yml
@@ -0,0 +1,48 @@
+name: CSS Linting
+on:
+  push:
+    branches-ignore:
+      - 'dependabot/**'
+    paths:
+      - 'package.json'
+      - 'yarn.lock'
+      - '.prettier*'
+      - 'stylelint.config.js'
+      - '**/*.css'
+      - '**/*.scss'
+      - '.github/workflows/lint-css.yml'
+      - '.github/stylelint-matcher.json'
+
+  pull_request:
+    paths:
+      - 'package.json'
+      - 'yarn.lock'
+      - '.prettier*'
+      - 'stylelint.config.js'
+      - '**/*.css'
+      - '**/*.scss'
+      - '.github/workflows/lint-css.yml'
+      - '.github/stylelint-matcher.json'
+
+jobs:
+  lint:
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Clone repository
+        uses: actions/checkout@v3
+
+      - name: Set up Node.js
+        uses: actions/setup-node@v3
+        with:
+          cache: yarn
+
+      - name: Install all yarn packages
+        run: yarn --frozen-lockfile
+
+      - uses: xt0rted/stylelint-problem-matcher@v1
+
+      - run: echo "::add-matcher::.github/stylelint-matcher.json"
+
+      - name: Stylelint
+        run: yarn test:lint:sass
diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml
index 575732845..58e6fcb25 100644
--- a/.github/workflows/linter.yml
+++ b/.github/workflows/linter.yml
@@ -50,19 +50,8 @@ jobs:
           # Full git history is needed to get a proper list of changed files within `super-linter`
           fetch-depth: 0
 
-      - name: Set-up Node.js
-        uses: actions/setup-node@v3
-        with:
-          node-version-file: .nvmrc
-          cache: yarn
-      - name: Install dependencies
-        run: yarn install --frozen-lockfile
       - name: Set-up RuboCop Problem Mathcher
         uses: r7kamura/rubocop-problem-matchers-action@v1
-      - name: Set-up Stylelint Problem Matcher
-        uses: xt0rted/stylelint-problem-matcher@v1
-      # https://github.com/xt0rted/stylelint-problem-matcher/issues/360
-      - run: echo "::add-matcher::.github/stylelint-matcher.json"
 
       ################################
       # Run Linter against code base #
@@ -70,12 +59,10 @@ jobs:
       - name: Lint Code Base
         uses: github/super-linter@v4
         env:
-          CSS_FILE_NAME: stylelint.config.js
           DEFAULT_BRANCH: main
           NO_COLOR: 1 # https://github.com/xt0rted/stylelint-problem-matcher/issues/360
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
           LINTER_RULES_PATH: .
           RUBY_CONFIG_FILE: .rubocop.yml
           VALIDATE_ALL_CODEBASE: false
-          VALIDATE_CSS: true
           VALIDATE_RUBY: true