Skip to content

Commit 2d9c20c

Browse files
author
1000ch
committed
Enable tests on Windows
1 parent b532386 commit 2d9c20c

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI
1+
name: test
22
on:
33
- push
44
- pull_request
@@ -15,6 +15,7 @@ jobs:
1515
os:
1616
- ubuntu-latest
1717
- macos-latest
18+
- windows-latest
1819
steps:
1920
- uses: actions/checkout@v2
2021
- uses: actions/setup-node@v2

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# cwebp-bin ![GitHub Actions Status](https://github.com/imagemin/cwebp-bin/workflows/test/badge.svg)
1+
# cwebp-bin ![GitHub Actions Status](https://github.com/imagemin/cwebp-bin/workflows/test/badge.svg?branch=main)
22

33
> [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.
44

test/test.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import fs from 'node:fs';
22
import path from 'node:path';
3+
import process from 'node:process';
34
import {fileURLToPath} from 'node:url';
45
import test from 'ava';
56
import execa from 'execa';
@@ -10,6 +11,12 @@ import compareSize from 'compare-size';
1011
import cwebp from '../index.js';
1112

1213
test('rebuild the cwebp binaries', async t => {
14+
// Skip the test on Windows
15+
if (process.platform === 'win32') {
16+
t.pass();
17+
return;
18+
}
19+
1320
const temporary = tempy.directory();
1421
const source = fileURLToPath(new URL('../vendor/source/libwebp-1.1.0.tar.gz', import.meta.url));
1522

0 commit comments

Comments
 (0)