Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/ci-bun.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: ci-bun

on:
push:
branches:
- main

pull_request:
branches:
- main

jobs:
ci-bun:
uses: eslint/workflows/.github/workflows/ci-bun.yml@main
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ jobs:
matrix:
os: [ubuntu-latest]
node: [25.x, 24.x, 22.x, 20.x, 18.x]
include:
- os: windows-latest
node: lts/*
- os: macOS-latest
node: lts/*
Comment on lines +29 to +33
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added Windows and macOS tests for more robust testing.

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5
Expand Down
35 changes: 18 additions & 17 deletions tests/lib/shell-ops.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,26 @@ describe("ShellOps", () => {

describe("getModifiedEnv()", () => {

it("should modify path correctly when on Windows", () => {
const env = ShellOps.getModifiedEnv("win32");
if(process.platform === "win32") {
Copy link
Member Author

@lumirlumir lumirlumir Oct 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've just wrapped the test cases with an if-else clause, so Windows tests run only on Windows, and Unix tests run on non-Windows environments.

This is because Bun CI fails on Windows, particularly for the Unix tests.

I suspect it's due to the Unix tests relying on a Unix-specific PATH, but they're being run on Windows.


FYI, the previous CI doesn't include Windows environment tests; adding regular tests that target Windows will cause failures.


https://github.com/eslint/eslint-release/actions/runs/18707118578/job/53347191545

Image

it("should modify path correctly when on Windows", () => {
const env = ShellOps.getModifiedEnv("win32");

assert.strictEqual(env.PATH, `${NODE_MODULES_PATH};${PATH}`);
});

[
"darwin",
"freebsd",
"linux",
"sunos"
].forEach(platform => {
it(`(with ${platform}) should modify path correctly when on Unix OS`, () => {
const env = ShellOps.getModifiedEnv(platform);

assert.strictEqual(env.PATH, `${NODE_MODULES_PATH}:${PATH}`);
assert.strictEqual(env.PATH, `${NODE_MODULES_PATH};${PATH}`);
});
});

} else {
[
"darwin",
"freebsd",
"linux",
"sunos"
].forEach(platform => {
it(`(with ${platform}) should modify path correctly when on Unix OS`, () => {
const env = ShellOps.getModifiedEnv(platform);

assert.strictEqual(env.PATH, `${NODE_MODULES_PATH}:${PATH}`);
});
});
}
});

describe("execSilent()", () => {
Expand Down