diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1251778..48efe82 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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: diff --git a/package.json b/package.json index 43d78c9..6fcb06a 100644 --- a/package.json +++ b/package.json @@ -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/*" }, diff --git a/test/index.test.js b/test/index.test.js index 11f57a7..792899b 100644 --- a/test/index.test.js +++ b/test/index.test.js @@ -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([])); + }); }); /** @@ -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) { + // zstd@1.0 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));