Skip to content

Commit

Permalink
asdf
Browse files Browse the repository at this point in the history
  • Loading branch information
baileympearson committed Nov 20, 2024
1 parent 1f7cfd2 commit dfa668d
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 27 deletions.
49 changes: 25 additions & 24 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,39 +8,40 @@ on:
name: Test

jobs:
host_tests:
strategy:
matrix:
os: [macos-latest, windows-2019]
node: [16.20.1, 18.x, 20.x, 22.x]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
# host_tests:
# strategy:
# matrix:
# os: [macos-latest, windows-2019]
# node: [16.20.1, 18.x, 20.x, 22.x]
# fail-fast: false
# runs-on: ${{ matrix.os }}
# steps:
# - uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'npm'
registry-url: 'https://registry.npmjs.org'
# - uses: actions/setup-node@v4
# with:
# node-version: ${{ matrix.node }}
# cache: 'npm'
# registry-url: 'https://registry.npmjs.org'

- name: Install zstd
run: npm run install-zstd
shell: bash
# - name: Install zstd
# run: npm run install-zstd
# shell: bash

- name: install dependencies and compmile
run: npm install --loglevel verbose
shell: bash
# - name: install dependencies and compmile
# run: npm install --loglevel verbose
# shell: bash

- name: Test ${{ matrix.os }}
shell: bash
run: npm test
# - name: Test ${{ matrix.os }}
# shell: bash
# run: npm test

container_tests:
runs-on: ubuntu-latest
strategy:
matrix:
linux_arch: [s390x, arm64, amd64]
# linux_arch: [s390x, arm64, amd64]
linux_arch: [s390x, arm64]
node: [16.x, 18.x, 20.x, 22.x]
fail-fast: true
steps:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"compile": "node-gyp rebuild",
"test": "mocha test/index.test.js",
"install-zstd": "bash etc/install-zstd.sh",
"check:eslint": "ESLINT_USE_FLAT_CONFIG=false eslint *ts lib/ .*.json",
"check:eslint": "ESLINT_USE_FLAT_CONFIG=false eslint *ts lib/*.js test/*.js .*.json",
"clang-format": "clang-format --style=file:.clang-format --Werror -i addon/*",
"check:clang-format": "clang-format --style=file:.clang-format --dry-run --Werror addon/*"
},
Expand Down
11 changes: 9 additions & 2 deletions test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ describe('compress', function () {
});

test('decompress() with empty buffer', async function () {
expect(await decompress(Buffer.from([]))).to.deep.equal(Buffer.from([]))
})
expect(await decompress(Buffer.from([]))).to.deep.equal(Buffer.from([]));
});
});

/**
Expand All @@ -45,6 +45,13 @@ describe('compress', function () {
*/
function testSuite(decompress, compress) {
return function () {
beforeEach(function () {
const isLinuxs390x = process.platform === 'linux' && process.arch === 's390x';
if (isLinuxs390x) {
// [email protected] did not support s390x, so we cannot run compatibility tests against it.
this.skip();
}
});
test('empty', async function () {
const input = Buffer.from('', 'utf8');
const result = await decompress(await compress(input));
Expand Down

0 comments on commit dfa668d

Please sign in to comment.