generated from justintaddei/npm-ts-template
-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9183a19
commit 05c61bf
Showing
4 changed files
with
152 additions
and
0 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,32 @@ | ||
version: 2 | ||
updates: | ||
# Fetch and update latest `npm` packages | ||
- package-ecosystem: npm | ||
directory: '/' | ||
schedule: | ||
interval: daily | ||
time: '00:00' | ||
open-pull-requests-limit: 10 | ||
reviewers: | ||
- justintaddei | ||
assignees: | ||
- justintaddei | ||
commit-message: | ||
prefix: fix | ||
prefix-development: chore | ||
include: scope | ||
# Fetch and update latest `github-actions` pkgs | ||
- package-ecosystem: github-actions | ||
directory: '/' | ||
schedule: | ||
interval: daily | ||
time: '00:00' | ||
open-pull-requests-limit: 10 | ||
reviewers: | ||
- justintaddei | ||
assignees: | ||
- justintaddei | ||
commit-message: | ||
prefix: fix | ||
prefix-development: chore | ||
include: scope |
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,36 @@ | ||
name: Conventional Commits | ||
|
||
on: [push] | ||
|
||
jobs: | ||
commitlint: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
node: [14] | ||
|
||
steps: | ||
- name: Checkout π | ||
uses: actions/checkout@master | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup node env π | ||
uses: actions/setup-node@v2.1.4 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: Cache node_modules π¦ | ||
uses: actions/cache@v2.1.4 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- name: Install dependencies β | ||
run: npm ci | ||
|
||
- name: Lint commit messages π | ||
run: npx commitlint --from=HEAD~1 |
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,67 @@ | ||
name: checks | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
tests: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
node: [14] | ||
|
||
steps: | ||
- name: Checkout π | ||
uses: actions/checkout@master | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup node env π | ||
uses: actions/setup-node@v2.1.4 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: Cache node_modules π¦ | ||
uses: actions/cache@v2.1.4 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- name: Install dependencies β | ||
run: npm ci | ||
|
||
- name: Run tests π§ͺ | ||
run: npm test | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
node: [14] | ||
|
||
steps: | ||
- name: Checkout π | ||
uses: actions/checkout@master | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup node env π | ||
uses: actions/setup-node@v2.1.4 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: Cache node_modules π¦ | ||
uses: actions/cache@v2.1.4 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- name: Install dependencies β | ||
run: npm ci | ||
|
||
- name: Build module bundles π | ||
run: npm run build |
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,17 @@ | ||
module.exports = { | ||
extends: ['@commitlint/config-conventional'], | ||
rules: { | ||
'body-max-length': [0], | ||
'body-max-line-length': [0] | ||
}, | ||
ignores: [ | ||
(commit) => { | ||
// WIP: commits | ||
return /^WIP(:\s(.|\n)+)?$/.test(commit.trim()) | ||
}, | ||
(commit) => { | ||
// $ npm version commits (1.1.0) | ||
return /^\d+\.\d+\.\d+.*$/.test(commit.trim()) | ||
} | ||
] | ||
} |