Skip to content

Commit

Permalink
add test and lint
Browse files Browse the repository at this point in the history
  • Loading branch information
baileympearson committed May 22, 2024
1 parent 6254a4c commit 94146c2
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
runs-on: ubuntu-latest

name: Lint ${{ matrix.lint-target }}
strategy:
matrix:
lint-target: ["c++", "typescript"]

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: "Build libmongocrypt"
shell: bash
run: |
node .github/scripts/libmongocrypt.mjs
npm install
npm run prebuild
- if: matrix.lint-target == 'c++'
shell: bash
run: |
npm run check:clang-format
- if: matrix.lint-target == 'typescript'
shell: bash
run: |
npm run check:eslint
31 changes: 31 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:

name: Test (Node ${{ matrix.node-version }})
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: "Build libmongocrypt"
shell: bash
run: |
node .github/scripts/libmongocrypt.mjs
npm install
npm run prebuild
- run: npm test

0 comments on commit 94146c2

Please sign in to comment.