Skip to content

Commit

Permalink
feat: add test github ci
Browse files Browse the repository at this point in the history
  • Loading branch information
chakhsu committed Nov 13, 2023
1 parent 26ae6a7 commit 9bd2915
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Test CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
contents: read

jobs:
test:
name: Test on Node.js ${{ matrix.node-version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
node-version: [16.x, 18.x, 20.x]
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
cache: 'npm'
node-version: ${{ matrix.node-version }}
# Use separate run commands so command status handled correctly on Windows
- name: npm install
run: npm ci
- name: npm test
run: npm test
- name: npm run lint
run: npm run lint
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
"lint": "standard -v 'lib/**/*.js' 'test/**/*.js' | snazzy",
"type-gen": "tsc -d --allowJs --outDir types index.js"
},
"engines": {
"node": ">=16"
},
"dependencies": {
"@grpc/grpc-js": "^1.9.7",
"@grpc/proto-loader": "^0.7.10",
Expand Down

0 comments on commit 9bd2915

Please sign in to comment.