mirror of
https://github.com/simple-icons/simple-icons.git
synced 2025-01-25 01:32:58 +02:00
Only lint changed SVG icons on CI (#10602)
This commit is contained in:
parent
6dca3fb56b
commit
2bcda1dd33
21
.github/workflows/verify.yml
vendored
21
.github/workflows/verify.yml
vendored
@ -30,14 +30,7 @@ jobs:
|
|||||||
node-version: 20
|
node-version: 20
|
||||||
cache: npm
|
cache: npm
|
||||||
cache-dependency-path: '**/package.json'
|
cache-dependency-path: '**/package.json'
|
||||||
- name: Install dependencies
|
- name: Detect changed files
|
||||||
run: npm i
|
|
||||||
- name: Run linter
|
|
||||||
run: npm run lint
|
|
||||||
env:
|
|
||||||
# Authorise GitHub API requests for editorconfig-checker
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
- name: Detect changed documentation files
|
|
||||||
uses: dorny/paths-filter@v3
|
uses: dorny/paths-filter@v3
|
||||||
id: changes
|
id: changes
|
||||||
with:
|
with:
|
||||||
@ -46,8 +39,18 @@ jobs:
|
|||||||
docs:
|
docs:
|
||||||
- '*.md'
|
- '*.md'
|
||||||
- '.github/**.md'
|
- '.github/**.md'
|
||||||
|
icons:
|
||||||
|
- 'icons/*.svg'
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm i
|
||||||
|
- name: Run linter
|
||||||
|
run: npm run lint --icons='${{ steps.changes.outputs.icons_files }}'
|
||||||
|
env:
|
||||||
|
# Authorise GitHub API requests for editorconfig-checker
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Check documentation links
|
- name: Check documentation links
|
||||||
if: steps.changes.outputs.docs == 'true'
|
if: steps.changes.outputs.docs == true
|
||||||
run: |
|
run: |
|
||||||
npx markdown-link-check --retry \
|
npx markdown-link-check --retry \
|
||||||
--config .github/markdown-link-check.json \
|
--config .github/markdown-link-check.json \
|
||||||
|
3
.npmrc
3
.npmrc
@ -1,2 +1,5 @@
|
|||||||
package-lock=false
|
package-lock=false
|
||||||
save-exact=true
|
save-exact=true
|
||||||
|
|
||||||
|
# Icons to lint with SVGLint (see `npm run svglint`)
|
||||||
|
icons=icons/*.svg
|
||||||
|
@ -116,7 +116,7 @@
|
|||||||
"our-lint": "node scripts/lint/ourlint.js",
|
"our-lint": "node scripts/lint/ourlint.js",
|
||||||
"jslint": "prettier --cache --check .",
|
"jslint": "prettier --cache --check .",
|
||||||
"jsonlint": "node scripts/lint/jsonlint.js",
|
"jsonlint": "node scripts/lint/jsonlint.js",
|
||||||
"svglint": "svglint icons/*.svg --ci",
|
"svglint": "svglint --ci $npm_config_icons",
|
||||||
"wslint": "editorconfig-checker",
|
"wslint": "editorconfig-checker",
|
||||||
"prepare": "is-ci || husky",
|
"prepare": "is-ci || husky",
|
||||||
"prepublishOnly": "npm run build",
|
"prepublishOnly": "npm run build",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user