tweak actions matrix

This commit is contained in:
silverwind 2024-05-28 00:48:24 +02:00
parent 0d0f684673
commit 1200c572a8
Signed by untrusted user: silverwind
GPG Key ID: 2E62B41C93869443
3 changed files with 15 additions and 7 deletions

@ -6,17 +6,22 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
node: [18, 20, 22] js: [[node, 18], [node, 20], [node,22], [bun,1]]
os: [ubuntu-latest, macos-latest, windows-latest] os: [ubuntu-latest, macos-latest, windows-latest]
bun: [latest]
runs-on: ${{matrix.os}} runs-on: ${{matrix.os}}
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
node-version: ${{matrix.node}} node-version: ${{matrix.js[1]}}
if: ${{matrix.js[0] == 'node'}}
- uses: oven-sh/setup-bun@v1 - uses: oven-sh/setup-bun@v1
with: with:
bun-version: ${{matrix.bun}} bun-version: ${{matrix.js[1]}}
if: ${{matrix.js[0] == 'bun'}}
- run: make lint test - 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"

@ -163,7 +163,7 @@ test("empty", async () => {
expect(exitCode).toEqual(0); expect(exitCode).toEqual(0);
}); });
if (env.CI) { if (env.CI && !env.BUN) {
test("global", async () => { test("global", async () => {
await execa("npm", ["i", "-g", "."]); await execa("npm", ["i", "-g", "."]);
const {stdout, stderr, exitCode} = await execa("updates", [ const {stdout, stderr, exitCode} = await execa("updates", [

@ -50,5 +50,8 @@
"vite-config-silverwind": "2.1.4", "vite-config-silverwind": "2.1.4",
"vitest": "1.6.0", "vitest": "1.6.0",
"vitest-config-silverwind": "9.0.6" "vitest-config-silverwind": "9.0.6"
} },
"trustedDependencies": [
"restana"
]
} }