Skip to content

Commit a00830d

Browse files
committed
chore: upgrade GitHub Actions and fix related issues
Actions bumped to latest: - actions/checkout: v4 → v6 - actions/setup-node: v4 → v6 - pnpm/action-setup: v4 → v6 (test job only; build job uses withastro/action) - withastro/action: v0 → v6 - actions/deploy-pages: v1 → v5 - node-version: 18 → 24 Fixes alongside the upgrade: - vitest v4: replace toContain() with toMatchObject() for plain object assertions - pnpm/action-setup@v6 now requires explicit version; add version: latest to test job - remove redundant pnpm/action-setup from build job (withastro/action@v6 handles it)
1 parent a0f6881 commit a00830d

2 files changed

Lines changed: 17 additions & 16 deletions

File tree

.github/workflows/gh-pages.yaml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,13 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Checkout your repository using git
19-
uses: actions/checkout@v3
20-
- uses: pnpm/action-setup@v4
21-
- uses: actions/setup-node@v3
19+
uses: actions/checkout@v6
20+
- uses: pnpm/action-setup@v6
2221
with:
23-
node-version: 18
22+
version: latest
23+
- uses: actions/setup-node@v6
24+
with:
25+
node-version: 24
2426
cache: 'pnpm'
2527
- run: pnpm install --frozen-lockfile
2628
- run: pnpm test
@@ -29,12 +31,11 @@ jobs:
2931
runs-on: ubuntu-latest
3032
steps:
3133
- name: Checkout your repository using git
32-
uses: actions/checkout@v3
33-
- uses: pnpm/action-setup@v4
34+
uses: actions/checkout@v6
3435
- name: Install, build, and upload your site output
35-
uses: withastro/action@v0
36+
uses: withastro/action@v6
3637
with:
37-
node-version: 18
38+
node-version: 24
3839
package-manager: pnpm
3940
deploy:
4041
needs: build
@@ -45,4 +46,4 @@ jobs:
4546
steps:
4647
- name: Deploy to GitHub Pages
4748
id: deployment
48-
uses: actions/deploy-pages@v1
49+
uses: actions/deploy-pages@v5

test/lib/ipv4.test.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,46 +3,46 @@ import { calcHosts, calcIP, assemble, parseFrom } from '../../src/lib/ipv4';
33

44
describe('parseFrom', () => {
55
it('1.2.3.4/5', () => {
6-
expect(parseFrom('1.2.3.4/5')).toContain({ address: assemble([1, 2, 3, 4]), prefix: 5 });
6+
expect(parseFrom('1.2.3.4/5')).toMatchObject({ address: assemble([1, 2, 3, 4]), prefix: 5 });
77
});
88

99
it('255.255.255.255/32', () => {
10-
expect(parseFrom('255.255.255.255/32')).toContain({
10+
expect(parseFrom('255.255.255.255/32')).toMatchObject({
1111
address: assemble([255, 255, 255, 255]),
1212
prefix: 31, // because currently it refuses 32 and strongly suggests 31 instead
1313
});
1414
});
1515

1616
it('255.255.255.255/33', () => {
17-
expect(parseFrom('255.255.255.255/33')).toContain({
17+
expect(parseFrom('255.255.255.255/33')).toMatchObject({
1818
address: -1,
1919
prefix: -1,
2020
});
2121
});
2222

2323
it('256.255.255.255/32', () => {
24-
expect(parseFrom('256.255.255.255/32')).toContain({
24+
expect(parseFrom('256.255.255.255/32')).toMatchObject({
2525
address: -1,
2626
prefix: -1,
2727
});
2828
});
2929

3030
it('255.256.255.255/32', () => {
31-
expect(parseFrom('255.256.255.255/32')).toContain({
31+
expect(parseFrom('255.256.255.255/32')).toMatchObject({
3232
address: -1,
3333
prefix: -1,
3434
});
3535
});
3636

3737
it('255.255.256.255/32', () => {
38-
expect(parseFrom('255.255.256.255/32')).toContain({
38+
expect(parseFrom('255.255.256.255/32')).toMatchObject({
3939
address: -1,
4040
prefix: -1,
4141
});
4242
});
4343

4444
it('255.255.255.256/32', () => {
45-
expect(parseFrom('255.255.255.256/32')).toContain({
45+
expect(parseFrom('255.255.255.256/32')).toMatchObject({
4646
address: -1,
4747
prefix: -1,
4848
});

0 commit comments

Comments
 (0)