Skip to content

Commit b45b5fc

Browse files
authored
Merge pull request #13 from JacobLinCool/multi-version-test
ci: run test on multiple versions
2 parents cb35ed4 + 736fbbf commit b45b5fc

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

.github/workflows/test.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,26 @@ on:
1212
jobs:
1313
test:
1414
strategy:
15+
fail-fast: false
1516
matrix:
1617
os:
1718
- ubuntu-latest
1819
- windows-latest
1920
- macos-latest
20-
21-
name: "${{ matrix.os }}"
21+
version:
22+
- "latest"
23+
- "2023.6.1"
24+
- "2023.4.2"
25+
- "2023.2.2"
26+
- "2022.12.1"
27+
28+
name: "${{ matrix.os }} - ${{ matrix.version }}"
2229
runs-on: ${{ matrix.os }}
30+
timeout-minutes: 15
2331
env:
2432
VERBOSE: 1
2533
TUNNEL_TOKEN: ${{ secrets.TUNNEL_TOKEN }}
34+
CLOUDFLARED_VERSION: ${{ matrix.version }}
2635

2736
steps:
2837
- name: Checkout Repository

src/_tests/index.test.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { ChildProcess } from "node:child_process";
22
import fs from "node:fs";
33
import { bin, install, tunnel, service } from "../lib.js";
4-
import { describe, it, expect, beforeAll, vi } from "vitest";
4+
import { describe, it, expect, beforeAll } from "vitest";
55

66
process.env.VERBOSE = "1";
77

@@ -25,7 +25,10 @@ describe(
2525
"tunnel",
2626
() => {
2727
it("should create a tunnel", async () => {
28-
const { url, connections, child, stop } = tunnel();
28+
const { url, connections, child, stop } = tunnel({
29+
"--url": "localhost:8080",
30+
"--no-autoupdate": "true",
31+
});
2932
expect(await url).toMatch(/https?:\/\/[^\s]+/);
3033
await connections[0]; // quick tunnel only has one connection
3134
expect(child).toBeInstanceOf(ChildProcess);

0 commit comments

Comments
 (0)