diff --git a/.github/workflows/live-test.yaml b/.github/workflows/live-test.yaml index a5f8fbe..6ed2cd7 100644 --- a/.github/workflows/live-test.yaml +++ b/.github/workflows/live-test.yaml @@ -32,7 +32,7 @@ jobs: strategy: matrix: - ipv: [4, 6] + ipv: [ipv4, ipv6] steps: - uses: actions/checkout@v4 @@ -51,10 +51,10 @@ jobs: run: npm ci --no-audit - name: Set up WARP - if: matrix.ipv == 6 + if: matrix.ipv == 'ipv6' uses: fscarmen/warp-on-actions@v1.0 - - name: Run tests (IPv4) + - name: Run tests env: IPV: ${{ matrix.ipv }} HOSTNAME: ${{ env.HOSTNAME }} diff --git a/test.ts b/test.ts index 401ecdb..2c65f49 100644 --- a/test.ts +++ b/test.ts @@ -5,9 +5,10 @@ import { randomWords } from "@nordicsemiconductor/random-words"; import { ipv4, ipv6 } from "./ip"; const hostname = process.env.HOSTNAME ?? "localhost"; -const ipv = process.env.IPV ?? "4"; +const ipv = process.env.IPV ?? "ipv4"; -const addr = ipv === "6" ? `[${await ipv6(hostname)}]` : await ipv4(hostname); +const addr = + ipv === "ipv6" ? `[${await ipv6(hostname)}]` : await ipv4(hostname); describe("MQTT server", async () => { await Promise.all(