Skip to content

Commit 67b6546

Browse files
committed
chore: Check if another DNS resolver makes test fail faster
1 parent 37ec88e commit 67b6546

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/nodejs.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
strategy:
99
fail-fast: false
1010
matrix:
11-
os: [ubuntu-latest, macos-26, windows-latest]
11+
os: [ubuntu-latest, macos-latest, windows-latest]
1212
node-version: [20.x, 22.x, 24.x]
1313
runs-on: ${{matrix.os}}
1414
steps:
@@ -19,5 +19,12 @@ jobs:
1919
node-version: ${{ matrix.node-version }}
2020
- name: Install Dependencies
2121
run: npm install
22+
- name: Use a faster DNS resolver for failures in Mac.
23+
if: runner.os == 'macOS'
24+
run: |
25+
SERVICE=$(networksetup -listallnetworkservices | tail -n +2 | head -n 1)
26+
sudo networksetup -setdnsservers "$SERVICE" 1.1.1.1 1.0.0.1
27+
sudo dscacheutil -flushcache
28+
sudo killall -HUP mDNSResponder
2229
- name: Test
2330
run: npm test

0 commit comments

Comments
 (0)