Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added github ci #353

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
lib/
es/
es6/
*.d.ts
src/**/*.js
test/**/*.js
.eslintrc.js
jest.config.js
coverage
74 changes: 74 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
/*
Rules Severity
- 0 = off
- 1 = warn
- 2 = error
*/
{
"env": {
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"impliedStrict": true
},
"ecmaVersion": "latest",
"project": "./tsconfig.json",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint",
"typescript-sort-keys"
],
"rules": {
// Javscript Specific Rules That Are Applied To Typescript Too
"max-len": [
"error",
{
"code": 80,
"ignoreComments": true,
"ignorePattern": "^(import)|(it\\()",
"ignoreTemplateLiterals": true
}
],
"no-console": 1,
"quotes": [
2,
"single"
],
"semi": 2,
"sort-keys": [
2,
"asc",
{
"caseSensitive": true,
"natural": false,
"minKeys": 2
}
],
// Typescript Specific Rules From This Point On
"typescript-sort-keys/interface": 2,
"typescript-sort-keys/string-enum": 0,
"@typescript-eslint/explicit-function-return-type": 2,
"@typescript-eslint/no-explicit-any": 2,
"@typescript-eslint/no-inferrable-types": 2,
"@typescript-eslint/no-non-null-assertion": 2,
"@typescript-eslint/no-unsafe-call": 2,
"@typescript-eslint/no-unsafe-member-access": 2,
"@typescript-eslint/no-unused-vars": [
2,
{
"argsIgnorePattern": "_",
"ignoreRestSiblings": true
}
],
"@typescript-eslint/no-var-requires": 2,
"@typescript-eslint/require-await": 2
}
}
6 changes: 6 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name-template: 'Next Release'
tag-template: 'next'
change-template: '- $TITLE #$NUMBER'
no-changes-template: '- No changes yet'
template: |
$CHANGES
34 changes: 34 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x, 14.x, 16.x]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we also be testing node 18.x? since its the current LTS

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also i believe restify 10 doesn't officially support 12.x

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm in favor of adding node 18 and dropping node 12

ts-project: [src/tsconfig.json, src/tsconfig-es6.json]

env:
TS_NODE_PROJECT: ${{ matrix.ts-project }}

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm cache clean --force
- run: npm ci
- run: npm run build --if-present
- run: npm test
12 changes: 0 additions & 12 deletions .travis.yml

This file was deleted.

181 changes: 0 additions & 181 deletions gulpfile.js

This file was deleted.

26 changes: 26 additions & 0 deletions jest.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"collectCoverage": true,
"coverageDirectory": "<rootDir>/coverage",
"coverageReporters": [
"html",
"json",
"text"
],
"moduleFileExtensions": [
"js",
"json",
"ts"
],
"rootDir": ".",
"setupFilesAfterEnv": [
"<rootDir>/test/helpers/jest.setup.ts"
],
"testEnvironment": "node",
"testPathIgnorePatterns": [
"node_modules"
],
"testRegex": ".test.ts$",
"transform": {
"^.+\\.ts$": "ts-jest"
}
}
Loading