test: zstd binary is now bundled

This commit is contained in:
MDLeom 2025-07-15 11:53:12 +00:00
parent 66a6050ecb
commit dd3039eca2
No known key found for this signature in database
GPG Key ID: 06C236E63CBC68AA
2 changed files with 1 additions and 52 deletions

View File

@ -24,51 +24,12 @@ jobs:
restore-keys: ${{ runner.os }}-npm-cache restore-keys: ${{ runner.os }}-npm-cache
- name: Install Dependencies - name: Install Dependencies
run: npm install run: npm install
- name: Determine zstd binary version
shell: bash
run: |
case "$RUNNER_OS" in
"Linux")
echo "PLATFORM=linux-x64-gnu" >> "$GITHUB_ENV" ;;
"Windows")
echo "PLATFORM=win32-x64-msvc" >> "$GITHUB_ENV" ;;
"macOS")
echo "PLATFORM=darwin-arm64" >> "$GITHUB_ENV" ;;
esac
- name: Install zstd binary
shell: bash
run: npm install "@mongodb-js/zstd-$PLATFORM"
- name: Test - name: Test
run: npm run test run: npm run test
env: env:
CI: true CI: true
coverage:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node-version: ["22"]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install Bun
uses: oven-sh/setup-bun@v1
- name: Cache NPM dependencies
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-npm-cache
restore-keys: ${{ runner.os }}-npm-cache
- name: Install Dependencies
run: bun install
- name: Coverage
run: npm run test
env:
CI: true
- name: Upload coverage report to Codecov - name: Upload coverage report to Codecov
if: matrix.os == "ubuntu-latest" && matrix.node-version == "22"
uses: codecov/codecov-action@v4 uses: codecov/codecov-action@v4
with: with:
fail_ci_if_error: true fail_ci_if_error: true

View File

@ -268,18 +268,6 @@ minify:
- **globOptions** - See [globbing](#globbing) section. - **globOptions** - See [globbing](#globbing) section.
- **level** - Compression level. Range `1-22`. Defaults to `3`, or the value of [`DEFAULT_LEVEL`](https://github.com/mongodb-js/zstd/blob/a3a08c61c9045411c8275e248498dbc583457fb5/src/lib.rs#L9) - **level** - Compression level. Range `1-22`. Defaults to `3`, or the value of [`DEFAULT_LEVEL`](https://github.com/mongodb-js/zstd/blob/a3a08c61c9045411c8275e248498dbc583457fb5/src/lib.rs#L9)
### Cannot find module '@mongodb-js/zstd-linux-x64-gnu'
`npm install --save @mongodb-js/zstd-linux-x64-gnu`
- @mongodb-js/zstd-darwin-arm64 (Apple Silicon)
- @mongodb-js/zstd-darwin-x64 (Intel Mac)
- @mongodb-js/zstd-linux-arm64-gnu
- @mongodb-js/zstd-linux-arm64-musl (Alpine)
- @mongodb-js/zstd-linux-x64-gnu
- @mongodb-js/zstd-linux-x64-musl (Alpine)
- @mongodb-js/zstd-win32-x64-msvc
## Globbing ## Globbing
Use "globOptions" to customise how glob patterns match files. Refer to [micromatch](https://github.com/micromatch/micromatch#options) for available options. Use "globOptions" to customise how glob patterns match files. Refer to [micromatch](https://github.com/micromatch/micromatch#options) for available options.