diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 084e470..c364634 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: CI +name: test on: - push - pull_request @@ -15,6 +15,7 @@ jobs: os: - ubuntu-latest - macos-latest + - windows-latest steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 diff --git a/readme.md b/readme.md index ad61647..a2f7caf 100644 --- a/readme.md +++ b/readme.md @@ -1,4 +1,4 @@ -# cwebp-bin ![GitHub Actions Status](https://github.com/imagemin/cwebp-bin/workflows/test/badge.svg) +# cwebp-bin ![GitHub Actions Status](https://github.com/imagemin/cwebp-bin/workflows/test/badge.svg?branch=main) > [WebP](https://developers.google.com/speed/webp/) is a new image format that provides lossless and lossy compression for images on the web. WebP lossless images are 26% smaller in size compared to PNGs. WebP lossy images are 25-34% smaller in size compared to JPEG images at equivalent SSIM index. diff --git a/test/test.js b/test/test.js index c7788a6..3865d7b 100644 --- a/test/test.js +++ b/test/test.js @@ -1,5 +1,6 @@ import fs from 'node:fs'; import path from 'node:path'; +import process from 'node:process'; import {fileURLToPath} from 'node:url'; import test from 'ava'; import execa from 'execa'; @@ -10,6 +11,12 @@ import compareSize from 'compare-size'; import cwebp from '../index.js'; test('rebuild the cwebp binaries', async t => { + // Skip the test on Windows + if (process.platform === 'win32') { + t.pass(); + return; + } + const temporary = tempy.directory(); const source = fileURLToPath(new URL('../vendor/source/libwebp-1.1.0.tar.gz', import.meta.url));