Skip to content

Commit

Permalink
Added github ci
Browse files Browse the repository at this point in the history
  • Loading branch information
dcavanagh committed Jan 18, 2023
1 parent 3fef6ed commit 9489e00
Show file tree
Hide file tree
Showing 19 changed files with 326 additions and 378 deletions.
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]
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

0 comments on commit 9489e00

Please sign in to comment.