Skip to content

Commit 5a22832

Browse files
Merge branch 'main' into no-story-qe-v2
2 parents 5c3124f + 39d898a commit 5a22832

File tree

5 files changed

+57
-5
lines changed

5 files changed

+57
-5
lines changed

Diff for: .github/docker/Dockerfile.glibc

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ FROM $NODE_BUILD_IMAGE AS build
44
WORKDIR /mongodb-client-encryption
55
COPY . .
66

7-
RUN node /mongodb-client-encryption/.github/scripts/libmongocrypt.mjs
7+
RUN npm run install:libmongocrypt
8+
RUN npm run test
89

910
FROM scratch
1011

Diff for: .github/workflows/build.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches: [main]
66
workflow_dispatch: {}
77

8-
name: build
8+
name: Build and Test
99

1010
jobs:
1111
host_builds:
@@ -20,6 +20,10 @@ jobs:
2020
run: node .github/scripts/libmongocrypt.mjs ${{ runner.os == 'Windows' && '--build' || '' }}
2121
shell: bash
2222

23+
- name: Test ${{ matrix.os }}
24+
shell: bash
25+
run: npm run test
26+
2327
- id: upload
2428
name: Upload prebuild
2529
uses: actions/upload-artifact@v4

Diff for: .github/workflows/lint.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
name: ${{ matrix.lint-target }}
14+
strategy:
15+
matrix:
16+
lint-target: ["c++", "typescript"]
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Use Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
cache: 'npm'
25+
- name: "Build libmongocrypt"
26+
shell: bash
27+
run: |
28+
npm run install:libmongocrypt
29+
30+
- if: matrix.lint-target == 'c++'
31+
shell: bash
32+
run: |
33+
npm run check:clang-format
34+
35+
- if: matrix.lint-target == 'typescript'
36+
shell: bash
37+
run: |
38+
npm run check:eslint

Diff for: package.json

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"lib": "lib"
1717
},
1818
"scripts": {
19+
"install:libmongocrypt": "node .github/scripts/libmongocrypt.mjs",
1920
"install": "prebuild-install --runtime napi || node-gyp rebuild",
2021
"clang-format": "clang-format --style=file:.clang-format --Werror -i addon/*",
2122
"check:eslint": "eslint src test",

Diff for: test/release.test.ts

+11-3
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,14 @@ const REQUIRED_FILES = [
2424
describe(`Release ${packFile}`, function () {
2525
this.timeout(10000);
2626

27+
beforeEach(function () {
28+
if (process.arch !== 'x64') {
29+
this.skip();
30+
}
31+
});
32+
2733
let tarFileList;
28-
before(() => {
34+
beforeEach(() => {
2935
expect(fs.existsSync(packFile)).to.equal(false);
3036
cp.execSync('npm pack', { stdio: 'ignore' });
3137
tarFileList = [];
@@ -38,8 +44,10 @@ describe(`Release ${packFile}`, function () {
3844
});
3945
});
4046

41-
after(() => {
42-
fs.unlinkSync(packFile);
47+
afterEach(() => {
48+
if (process.arch === 'x64') {
49+
fs.unlinkSync(packFile);
50+
}
4351
});
4452

4553
for (const requiredFile of REQUIRED_FILES) {

0 commit comments

Comments
 (0)