8000 Merge pull request #27 from log4js-node/gh-actions-build · log4js-node/logFaces-HTTP@3d49633 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3d49633

Browse files
authored
Merge pull request #27 from log4js-node/gh-actions-build
Add build workflow
2 parents 775e335 + afdc76f commit 3d49633

File tree

4 files changed

+51
-2
lines changed

4 files changed

+51
-2
lines changed

.github/workflows/node.js.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: Node.js CI
5+
6+
on:
7+
push:
8+
branches: [ master ]
9+
pull_request:
10+
branches: [ master ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
matrix:
19+
node-version: [12.x, 14.x, 16.x]
20+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
21+
22+
steps:
23+
- uses: actions/checkout@v2
24+
- name: Use Node.js ${{ matrix.node-version }}
25+
uses: actions/setup-node@v2
26+
with:
27+
node-version: ${{ matrix.node-version }}
28+
cache: 'npm'
29+
- run: npm ci
30+
- run: npm run build --if-present
31+
- run: npm test
32+
- run: npm run typings

package-lock.json

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@
3131
"scripts": {
3232
"prepush": "npm test",
3333
"commitmsg": "validate-commit-msg",
34-
"pretest": "eslint \"lib/**/*.js\" \"test/**/*.js\"",
35-
"test": "tap \"test/tap/**/*.js\" --cov",
34+
"pretest": "eslint 'lib/**/*.js' 'test/**/*.js'",
35+
"test": "tap 'test/tap/**/*.js' --100",
36+
"typings": "tsc -p types/tsconfig.json",
3637
"codecov": "tap 'test/tap/**/*.js' --cov --coverage-report=lcov && codecov"
3738
},
3839
"directories": {
@@ -54,6 +55,7 @@
5455
"log4js": "^6.5.2",
5556
"nyc": "^15.1.0",
5657
"tap": "^16.2.0",
58+
"typescript": "^4.7.2",
5759
"validate-commit-msg": "^2.14.0"
5860
},
5961
"browser": {

types/tsconfig.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"compileOnSave": false,
3+
"compilerOptions": {
4+
"strict": true,
5+
"noUnusedParameters": true,
6+
"noUnusedLocals": false,
7+
"noEmit": true
8+
}
9+
}

0 commit comments

Comments
 (0)
0