-
Notifications
You must be signed in to change notification settings - Fork 3
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
Showing
6 changed files
with
5,762 additions
and
3,154 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 |
---|---|---|
|
@@ -3,49 +3,65 @@ name: CI | |
on: [pull_request] | ||
|
||
jobs: | ||
build: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4.1.1 | ||
|
||
- name: Load cached modules | ||
uses: actions/cache@v2 | ||
uses: actions/cache@v3.3.3 | ||
with: | ||
path: | | ||
**/node_modules | ||
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }} | ||
|
||
- name: Load Node.js latest | ||
uses: actions/setup-node@v2-beta | ||
uses: actions/setup-node@v4.0.1 | ||
with: | ||
node-version: '20.x' | ||
|
||
- name: Install all dependencies | ||
run: npm ci | ||
|
||
- name: Compile TypeScript and build Library files | ||
run: npm run build | ||
- name: Run ESLint | ||
run: npm run lint | ||
build: | ||
name: build | ||
needs: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
|
||
lint: | ||
name: lint | ||
- uses: actions/[email protected] | ||
with: | ||
path: | | ||
**/node_modules | ||
**/lib | ||
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }} | ||
|
||
- uses: actions/[email protected] | ||
with: | ||
node-version: '20.x' | ||
|
||
- run: npm run build | ||
test: | ||
name: test | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/[email protected] | ||
- uses: actions/[email protected] | ||
|
||
- name: Use Node.js latest | ||
uses: actions/setup-node@v2-beta | ||
- uses: actions/[email protected] | ||
with: | ||
node-version: '20.x' | ||
|
||
- name: Get cached modules | ||
uses: actions/[email protected] | ||
- uses: actions/[email protected] | ||
with: | ||
path: | | ||
**/node_modules | ||
**/lib | ||
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }} | ||
|
||
- name: Run ESLint | ||
run: npm run lint | ||
- name: Test | ||
run: npm run test:nobuild |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
.idea | ||
.vscode | ||
.vscode/settings.json | ||
coverage | ||
/commonjs/ | ||
lib | ||
|
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 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "Build", | ||
"command": "npm run build", | ||
"type": "shell", | ||
"args": [], | ||
"isBackground": true, | ||
"problemMatcher": [], | ||
"icon": { | ||
"id": "symbol-method", | ||
"color": "terminal.ansiBlue" | ||
} | ||
}, | ||
{ | ||
"label": "Test with Jest", | ||
"command": "npm test", | ||
"type": "shell", | ||
"args": [], | ||
"isBackground": true, | ||
"problemMatcher": [], | ||
"icon": { | ||
"id": "go-to-file", | ||
"color": "terminal.ansiGreen" | ||
} | ||
}, | ||
{ | ||
"label": "Test without Building", | ||
"command": "npm run test:nobuild", | ||
"type": "shell", | ||
"args": [], | ||
"isBackground": true, | ||
"problemMatcher": [], | ||
"icon": { | ||
"id": "go-to-file", | ||
"color": "terminal.ansiGreen" | ||
} | ||
}, | ||
{ | ||
"label": "Open Test Coverage", | ||
"command": "npm run lcov", | ||
"type": "shell", | ||
"args": [], | ||
"isBackground": true, | ||
"problemMatcher": [], | ||
"icon": { | ||
"id": "file-code", | ||
"color": "terminal.ansiYellow" | ||
} | ||
} | ||
], | ||
"extensions": { | ||
"recommendations": [ | ||
"prettier.prettier-vscode", | ||
"dbaeumer.vscode-eslint", | ||
"steoates.autoimport", | ||
"vivaxy.vscode-conventional-commits", | ||
"usernamehw.errorlens", | ||
"usernamehw.remove-empty-lines", | ||
"aljazsim.tsco" | ||
] | ||
}, | ||
"settings": { | ||
"typescript.tsdk": "node_modules/typescript/lib" | ||
} | ||
} |
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
Oops, something went wrong.