Skip to content

Commit

Permalink
CI: move lint to a separate workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Apr 26, 2023
1 parent 4b26d5a commit a6ddd19
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 4 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Lint

on:
push:
branches:
- main
pull_request:
workflow_dispatch:

env:
FORCE_COLOR: 2
NODE: 18

permissions:
contents: read

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Clone repository
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "${{ env.NODE }}"
cache: npm

- name: Install npm dependencies
run: npm ci

- name: Lint
run: npm run test
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ jobs:
- name: Build the icons
run: npm run icons

- name: Run tests
run: npm test
- name: Build and test docs
run: npm run docs-test

- name: Run linkinator
uses: JustinBeckwith/linkinator-action@v1
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
"start": "npm run docs-serve",
"docs-serve": "hugo server --port 4000 --disableFastRender",
"docs-build": "hugo --cleanDestinationDir --printUnusedTemplates",
"docs-test": "npm-run-all docs-build docs-test:vnu",
"docs-test:vnu": "node build/vnu-jar.js",
"pages": "node build/build-pages.js",
"icons": "npm-run-all icons-main --aggregate-output --parallel icons-sprite icons-font",
"icons-main": "node build/build-svgs.js",
Expand All @@ -58,9 +60,8 @@
"test:eslint": "eslint --cache --cache-location .cache/.eslintcache --report-unused-disable-directives .",
"test:stylelint": "stylelint docs/assets/scss/ --cache --cache-location .cache/.stylelintcache",
"test:lockfile-lint": "lockfile-lint --allowed-hosts npm --allowed-schemes https: --empty-hostname false --type npm --path package-lock.json",
"test:vnu": "node build/vnu-jar.js",
"test:check-icons": "node build/check-icons.js",
"test": "npm-run-all docs-build --parallel --aggregate-output --continue-on-error test:*"
"test": "npm-run-all --parallel --aggregate-output --continue-on-error test:*"
},
"devDependencies": {
"@twbs/fantasticon": "^2.7.1",
Expand Down

0 comments on commit a6ddd19

Please sign in to comment.