Skip to content

Commit

Permalink
CI: housekeeping improvements (#61)
Browse files Browse the repository at this point in the history
* ci(node): run checks on push and pull requests
  • Loading branch information
simeonoff authored Dec 12, 2022
1 parent 8880d1b commit 42f7bec
Show file tree
Hide file tree
Showing 6 changed files with 95 additions and 3 deletions.
28 changes: 28 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true

[*]

# Change these settings to your own preference
indent_style = space
indent_size = 2
quote_type = single
# We recommend you to keep these unchanged
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false

[*.json]
indent_size = 2

[*.{html,js,md}]
block_comment_start = /**
block_comment = *
block_comment_end = */
30 changes: 30 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x, 18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run lint
- run: npm run test
- run: npm run build:e2e
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged
22 changes: 22 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 10 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,17 @@
"build:docs:en:staging": "set NODE_ENV=staging && npx sassdoc ./sass -d docs",
"build:e2e": "sass ./test/e2e/theme.scss ./test/e2e/theme.css",
"build:json": "node scripts/buildJSON.mjs",
"lint": "stylelint ./sass",
"serve:docs": "npx http-server ./docs",
"preview:palette": "node scripts/previewPalette.mjs",
"lint": "stylelint ./sass",
"test": "jest",
"serve:docs": "npx http-server ./docs"
"format": "stylelint \"**/*.{scss,css}\" --fix --allow-empty-input --ignore-path .gitignore",
"prepare": "husky install"
},
"lint-staged": {
"**/*.{scss,css}": [
"npm run format"
]
},
"files": [
"/sass",
Expand Down Expand Up @@ -52,6 +59,7 @@
},
"devDependencies": {
"globby": "^13.1.2",
"husky": "^8.0.2",
"igniteui-sassdoc-theme": "^1.1.4",
"jest": "^28.1.1",
"lunr": "^2.3.9",
Expand Down
2 changes: 1 addition & 1 deletion sass/color/_functions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ $_enhanced-accessibility: false;
/// @group Palettes
/// @param {Color} $primary - The primary color used to generate the primary color palette (required).
/// @param {Color} $secondary - The secondary color used to generate the secondary color palette (required).
/// @param {Color} $surface - The color used as a background in components, such as cards, sheets, and menus (required).
/// @param {Color} $surface - The color used as a background in components (required).
/// @param {Color} $gray [null] - The color used for generating the grayscale palette (optional).
/// @param {Color} $info [#1377d5] - The information color used throughout the application (optional).
/// @param {Color} $success [#4eb862] - The success color used throughout the application (optional).
Expand Down

0 comments on commit 42f7bec

Please sign in to comment.