Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: move lint to a separate workflow #1695

Merged
merged 1 commit into from
Apr 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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