-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# | ||
# # DO NOT MODIFY, WILL BE OVERWRITTEN BY @naturalcycles/dev-lib | ||
# | ||
version: 2 | ||
|
||
checks: | ||
argument-count: | ||
config: | ||
threshold: 5 | ||
complex-logic: | ||
config: | ||
threshold: 4 | ||
file-lines: | ||
config: | ||
threshold: 800 | ||
method-complexity: | ||
config: | ||
threshold: 8 | ||
method-count: | ||
config: | ||
threshold: 50 | ||
method-lines: | ||
config: | ||
threshold: 100 | ||
nested-control-flow: | ||
config: | ||
threshold: 5 | ||
return-statements: | ||
config: | ||
threshold: 20 | ||
similar-code: | ||
config: | ||
threshold: 60 | ||
identical-code: | ||
config: | ||
threshold: 50 | ||
|
||
exclude_patterns: | ||
- 'dist/' | ||
- 'node_modules/' | ||
- '**/*.test.*' | ||
- '**/*.mock.*' | ||
- '**/*.cnst.*' | ||
- '**/*.config.*' | ||
- '**/*.d.ts' | ||
- 'build/' | ||
- 'src/test/' | ||
- 'src/environments/' | ||
- 'src/env/' | ||
- 'src/vendor/' | ||
- 'scripts/' | ||
- 'other/' | ||
- 'patch/' | ||
- 'cordova-hooks/' | ||
- 'test/' | ||
- 'resources/' | ||
- 'static/' | ||
- 'secret/' | ||
- 'ex/' | ||
- 'docs/' | ||
- 'docker/' | ||
- 'public/' | ||
- '**/__exclude/' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# | ||
# DO NOT MODIFY, WILL BE OVERWRITTEN BY @naturalcycles/dev-lib | ||
# | ||
# http://editorconfig.org | ||
# | ||
|
||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[**.md] | ||
trim_trailing_whitespace = false | ||
indent_size = 4 | ||
|
||
[**.html] | ||
indent_size = 2 | ||
|
||
[**.{css,scss}] | ||
indent_size = 2 | ||
|
||
[**.{js,ts}] | ||
indent_size = 2 | ||
|
||
[**.json] | ||
indent_size = 2 | ||
|
||
[**.xml] | ||
indent_size = 2 | ||
|
||
[**.java] | ||
indent_size = 4 | ||
|
||
[**.sql] | ||
indent_size = 2 | ||
|
||
[.eslintrc] | ||
indent_size = 2 | ||
|
||
[**.min.*] | ||
indent_style = ignore | ||
trim_trailing_whitespace = false | ||
insert_final_newline = ignore |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: default | ||
|
||
on: [push, workflow_dispatch] | ||
|
||
jobs: | ||
build-and-test-job: | ||
runs-on: ubuntu-latest | ||
if: "!contains(github.event.head_commit.message, 'skip ci')" | ||
env: | ||
NODE_OPTIONS: '--max-old-space-size=3200' | ||
# CC_TEST_REPORTER_ID: 79976xxx set yours here | ||
steps: | ||
- { uses: actions/checkout@v2, with: { persist-credentials: false } } | ||
- { uses: actions/setup-node@v2, with: { node-version: 14 } } | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ./node_modules | ||
key: deps-v1-${{ runner.os }}-${{ hashFiles('yarn.lock') }} | ||
- { name: yarn, run: yarn --frozen-lockfile } | ||
|
||
- name: build | ||
run: yarn build | ||
|
||
- name: test | ||
run: | | ||
# curl -s -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter && chmod +x ./cc-test-reporter | ||
# ./cc-test-reporter before-build | ||
yarn test-ci | ||
# ./cc-test-reporter after-build -t lcov | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: { name: 'unit.xml', path: 'tmp/jest/unit.xml' } | ||
- uses: actions/upload-artifact@v2 | ||
with: { name: 'coverage-unit', path: 'coverage/lcov-report' } |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: docs | ||
|
||
on: | ||
push: | ||
# branches: [master, docs] # uncomment to enable on master | ||
branches: [docs] | ||
|
||
jobs: | ||
docs-job: | ||
runs-on: ubuntu-latest | ||
if: "!contains(github.event.head_commit.message, 'skip ci')" | ||
env: { NODE_OPTIONS: '--max-old-space-size=3200' } | ||
steps: | ||
- { uses: actions/checkout@v2, with: { persist-credentials: false } } | ||
- { uses: actions/setup-node@v2, with: { node-version: 14 } } | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ./node_modules | ||
key: deps-v1-${{ runner.os }}-${{ hashFiles('yarn.lock') }} | ||
- { name: yarn, run: yarn --frozen-lockfile } | ||
|
||
- name: docs-build | ||
run: yarn docs-build | ||
|
||
- name: publish docs to github pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./docs/.vuepress/dist | ||
force_orphan: true | ||
commit_message: 'deploy docs [skip ci]' | ||
# publish_branch: gh-pages |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: release | ||
|
||
on: | ||
push: | ||
branches: [master, next, act] | ||
|
||
jobs: | ||
release-job: | ||
runs-on: ubuntu-latest | ||
if: "!contains(github.event.head_commit.message, 'skip ci')" | ||
env: { NODE_OPTIONS: '--max-old-space-size=3200' } | ||
steps: | ||
- { uses: actions/checkout@v2, with: { persist-credentials: true } } | ||
- { uses: actions/setup-node@v2, with: { node-version: 14 } } | ||
|
||
# Cache for npm/npx in ~/.npm | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/.npm | ||
key: npm-v1-${{ runner.os }} | ||
|
||
# Normal cache for yarn in ./node_modules | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ./node_modules | ||
key: deps-v1-${{ runner.os }}-${{ hashFiles('yarn.lock') }} | ||
|
||
- name: yarn | ||
run: yarn --frozen-lockfile | ||
|
||
- name: build | ||
run: yarn build-prod | ||
|
||
- name: release | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: npx @naturalcycles/semantic-release |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh | ||
[ -n "$CI" ] && exit 0 | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
yarn commitlint-def $1 | ||
# exit 1 # uncomment to debug |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
[ -n "$CI" ] && exit 0 | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
yarn lint-staged-def |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"@naturalcycles/generator-nodejs-lib": { | ||
"promptValues": { | ||
"npmName": "sunrise-timer-ha", | ||
"githubOrg": "kribor", | ||
"githubRepoName": "sunrise-timer-ha", | ||
"moduleAuthor": "Kristofer Borgström", | ||
"npmAccess": "public" | ||
}, | ||
"answers": { | ||
"npmName": "sunrise-timer-ha", | ||
"githubOrg": "kribor", | ||
"githubRepoName": "sunrise-timer-ha", | ||
"moduleAuthor": "Kristofer Borgström", | ||
"npmNameWithoutScope": "sunrise-timer-ha", | ||
"githubFullName": "kribor/sunrise-timer-ha", | ||
"npmAccess": "public" | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
...require('@naturalcycles/dev-lib/cfg/jest.config'), | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.