-
Notifications
You must be signed in to change notification settings - Fork 1
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
79 additions
and
34 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,11 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "npm" # See documentation for possible values | ||
directory: "/" # Location of package manifests | ||
schedule: | ||
interval: "daily" |
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,49 @@ | ||
on: | ||
|
||
push: | ||
branches: | ||
- "**" | ||
|
||
pull_request: | ||
branches: | ||
- "**" | ||
|
||
jobs: | ||
|
||
test: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: | ||
- 14.x | ||
- 16.x | ||
- 18.x | ||
|
||
steps: | ||
|
||
- name: checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: install NodeJS ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: install NPM dependencies | ||
run: npm install | ||
|
||
- name: run tests | ||
run: npm run test | ||
|
||
- name: compute coverage | ||
if: matrix.node-version == '18.x' | ||
run: npm run coverage | ||
|
||
- name: send result to coveralls | ||
if: matrix.node-version == '18.x' | ||
uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
path-to-lcov: coverage.lcov |
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,3 +1,4 @@ | ||
/.nyc_output | ||
/node_modules | ||
/*.lcov | ||
/yarn.lock |
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
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
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,11 +1,14 @@ | ||
"use strict"; | ||
|
||
const ESLint = require( `eslint` ).CLIEngine; | ||
const linter = new ESLint(); | ||
const report = linter.executeOnFiles( [ `${ __dirname }/../../` ] ); | ||
if ( report.errorCount || report.warningCount ) { | ||
console.log( linter.getFormatter( `codeframe` )( report.results ) ); | ||
if ( report.errorCount ) { | ||
process.exit( 1 ); | ||
const { ESLint } = require( `eslint` ); | ||
const formatter = require( `eslint-formatter-codeframe` ); | ||
|
||
( new ESLint() ).lintFiles( [ `${ __dirname }/../../` ] ).then( report => { | ||
if ( report.errorCount || report.warningCount ) { | ||
console.log( formatter( report.results ) ); | ||
if ( report.errorCount ) { | ||
process.exit( 1 ); | ||
} | ||
} | ||
} | ||
} ); | ||
|