Skip to content

Commit

Permalink
Merge PR #11 from 'nodech/pkg-ci'
Browse files Browse the repository at this point in the history
  • Loading branch information
nodech committed Jul 6, 2023
2 parents 138bbd4 + 1230c99 commit 7b662e7
Show file tree
Hide file tree
Showing 3 changed files with 122 additions and 20 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
},
"rules": {
"max-len": "off",
"prefer-arrow-callback": "off"
"prefer-arrow-callback": "off",
"no-return-assign": "off"
}
}
],
Expand Down
74 changes: 55 additions & 19 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,72 @@
name: Build

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

jobs:
build:

jobs:
lint:
name: Lint
runs-on: ubuntu-latest

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

steps:
- uses: actions/checkout@v3

- name: Setup
uses: actions/setup-node@v3
with:
node-version: 20.x

- uses: actions/checkout@v2
- name: Setup ${{ matrix.node-version }}
uses: actions/setup-node@v2
- name: Install tools
run: npm install --location=global bslint

- name: Install
run: npm install nyc coveralls bslint
- name: Install dependencies
run: npm install

- name: Lint
run: npm run lint

- name: Test
cover:
name: Coverage test
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup
uses: actions/setup-node@v3
with:
node-version: 20.x

- name: Install tools
run: npm install --location=global nyc coveralls

- name: Install dependencies
run: npm install

- name: Coverage test
run: npm run test-ci

- name: Coverage
uses: coverallsapp/github-action@v1.1.2
uses: coverallsapp/github-action@v2

test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node: [16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
node-version: ${{ matrix.node }}

- name: Install dependencies
run: npm install

- name: Test
run: npm test
65 changes: 65 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7b662e7

Please sign in to comment.