-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add and configure husky and conventional-commit
- Loading branch information
Showing
4 changed files
with
42,574 additions
and
28,741 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: Build, Test, Release | ||
|
||
# On pushes to master (i.e. merging a PR) | ||
# run all tests, on win, macos, linux, on node 12 & 14 | ||
on: | ||
push: | ||
branches: | ||
# UMCOMMENT BEFORE WE MERGE BETA -> MASTER | ||
# - master - | ||
- beta | ||
# Dont run if it's just markdown or doc files | ||
paths-ignore: | ||
- "**.md" | ||
- "docs/**" | ||
|
||
jobs: | ||
# First, build and test on multiple os's | ||
# and multuple versions of node | ||
build_and_test: | ||
name: Build and Test | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
# PRs will run tests on node 14,16 on ubuntu, macos and windows | ||
# so for the release, we're just running node 16@ubuntu | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
node: [16] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: Install | ||
run: npm ci | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Test in Chrome | ||
run: npm run test:chrome:ci | ||
|
||
- name: Test in Node | ||
run: npm run test:node | ||
|
||
- uses: codecov/codecov-action@v1 | ||
with: | ||
directory: ./coverage | ||
|
||
# If the build and test works, run a release | ||
release: | ||
name: Release | ||
needs: [build_and_test] | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16.13 | ||
|
||
- name: Install | ||
run: npm ci | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: npm run release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
|
||
|
||
const Configuration = { | ||
/* | ||
* Resolve and load @commitlint/config-conventional from node_modules. | ||
* Referenced packages must be installed | ||
*/ | ||
extends: ['@commitlint/config-lerna-scopes', '@commitlint/config-conventional'], | ||
/* | ||
* Resolve and load conventional-changelog-atom from node_modules. | ||
* Referenced packages must be installed | ||
*/ | ||
// parserPreset: 'conventional-changelog-atom', | ||
/* | ||
* Resolve and load @commitlint/format from node_modules. | ||
* Referenced package must be installed | ||
*/ | ||
formatter: '@commitlint/format', | ||
/* | ||
* Any rules defined here will override rules from @commitlint/config-conventional | ||
*/ | ||
rules: { | ||
'type-enum': [2, 'always', ['build', 'chore', 'ci', 'docs', 'feat', 'fix', 'perf', 'refactor', 'revert', 'style', 'test']], | ||
}, | ||
/* | ||
* Functions that return true if commitlint should ignore the given message. | ||
*/ | ||
ignores: [ | ||
// empty commit messages | ||
(commit) => commit === '', | ||
// pr feedback | ||
(commit) => /^PR:/i.test(commit) | ||
], | ||
/* | ||
* Whether commitlint uses the default ignore rules. | ||
*/ | ||
defaultIgnores: true, | ||
}; | ||
|
||
module.exports = Configuration; |
Oops, something went wrong.