diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 94a404b..4e17c1b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -6,17 +6,22 @@ jobs: strategy: fail-fast: false matrix: - node: [18, 20, 22] + js: [[node, 18], [node, 20], [node,22], [bun,1]] os: [ubuntu-latest, macos-latest, windows-latest] - bun: [latest] runs-on: ${{matrix.os}} steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: ${{matrix.node}} + node-version: ${{matrix.js[1]}} + if: ${{matrix.js[0] == 'node'}} - uses: oven-sh/setup-bun@v1 with: - bun-version: ${{matrix.bun}} + bun-version: ${{matrix.js[1]}} + if: ${{matrix.js[0] == 'bun'}} - run: make lint test - - run: bun test + if: ${{matrix.js[0] == 'node'}} + - run: bun install && bunx vite build && chmod +x dist/index.js && bun test + if: ${{matrix.js[0] == 'bun'}} + env: + BUN: "true" diff --git a/index.test.ts b/index.test.ts index 99aa43a..c794180 100644 --- a/index.test.ts +++ b/index.test.ts @@ -163,7 +163,7 @@ test("empty", async () => { expect(exitCode).toEqual(0); }); -if (env.CI) { +if (env.CI && !env.BUN) { test("global", async () => { await execa("npm", ["i", "-g", "."]); const {stdout, stderr, exitCode} = await execa("updates", [ diff --git a/package.json b/package.json index ffba34f..103d7d6 100644 --- a/package.json +++ b/package.json @@ -50,5 +50,8 @@ "vite-config-silverwind": "2.1.4", "vitest": "1.6.0", "vitest-config-silverwind": "9.0.6" - } + }, + "trustedDependencies": [ + "restana" + ] }