|
19 | 19 | matrix: |
20 | 20 | os: [ubuntu-latest, macOS-latest, windows-2025] |
21 | 21 | # Pinning 20.x version as a temporary workaround due to this https://github.com/nodejs/node/issues/52884 |
22 | | - node-version: ['20.12.2', '22'] |
| 22 | + node-version: ['20.12.2', '22', '24'] |
23 | 23 | shard: ['1/4', '2/4', '3/4', '4/4'] |
24 | | - |
25 | | - exclude: |
26 | | - - os: windows-2025 |
27 | | - node-version: '22' |
28 | 24 | fail-fast: false |
29 | 25 | steps: |
30 | 26 | # This improves Windows network performance, we need this since we open many ports in our tests |
@@ -109,87 +105,3 @@ jobs: |
109 | 105 | with: |
110 | 106 | flags: ${{ steps.test-coverage-flags.outputs.os }},${{ steps.test-coverage-flags.outputs.node }} |
111 | 107 | token: ${{ secrets.CODECOV_TOKEN }} |
112 | | - # Specific tests for known test that failed on windows using node 23. |
113 | | - # Can be replaced with larger node 23 tests in the future. |
114 | | - integration-win-node-23: |
115 | | - name: Integration test windows latest node23 specific |
116 | | - runs-on: windows-2025 |
117 | | - timeout-minutes: 40 |
118 | | - steps: |
119 | | - # This improves Windows network performance, we need this since we open many ports in our tests |
120 | | - - name: Increase Windows port limit and reduce time wait delay |
121 | | - run: | |
122 | | - netsh int ipv4 set dynamicport tcp start=1025 num=64511 |
123 | | - REG ADD HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TCPIP\Parameters /v TcpTimedWaitDelay /t REG_DWORD /d 30 /f |
124 | | -
|
125 | | - - name: Git checkout |
126 | | - uses: actions/checkout@v5 |
127 | | - with: |
128 | | - fetch-depth: 0 |
129 | | - |
130 | | - - name: Use Node.js |
131 | | - uses: actions/setup-node@v5 |
132 | | - with: |
133 | | - node-version: '23.x' |
134 | | - cache: npm |
135 | | - check-latest: true |
136 | | - |
137 | | - - name: Install PNPM |
138 | | - run: | |
139 | | - corepack enable |
140 | | - corepack prepare [email protected] --activate |
141 | | -
|
142 | | - - name: Setup Deno |
143 | | - uses: denoland/setup-deno@v1 |
144 | | - with: |
145 | | - deno-version: v1.44.4 |
146 | | - |
147 | | - - name: Install core dependencies |
148 | | - run: npm ci --no-audit |
149 | | - |
150 | | - - name: Build project |
151 | | - run: npm run build |
152 | | - if: '${{!steps.release-check.outputs.IS_RELEASE}}' |
153 | | - |
154 | | - - name: Prepare tests |
155 | | - run: npm run test:init |
156 | | - |
157 | | - - name: Tests |
158 | | - run: npm exec vitest -- run tests/integration/commands/dev/dev.test.ts --coverage |
159 | | - env: |
160 | | - # GitHub secrets are not available when running on PR from forks |
161 | | - # We set a flag so we can skip tests that access Netlify API |
162 | | - NETLIFY_TEST_DISABLE_LIVE: |
163 | | - ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == true }} |
164 | | - NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} |
165 | | - # NETLIFY_TEST_GITHUB_TOKEN is used to avoid reaching GitHub API limits in exec-fetcher.js |
166 | | - NETLIFY_TEST_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
167 | | - # Changes the polling interval used by the file watcher |
168 | | - CHOKIDAR_INTERVAL: 20 |
169 | | - CHOKIDAR_USEPOLLING: 1 |
170 | | - |
171 | | - - name: Get test coverage flags |
172 | | - id: test-coverage-flags |
173 | | - # For windows we have to use $env: |
174 | | - run: |- |
175 | | - os=windows-2025 |
176 | | - node=$(node --version) |
177 | | - echo "os=${os/-latest/}" >> $GITHUB_OUTPUT |
178 | | - echo "os=${os/-latest/}" >> $env:GITHUB_OUTPUT |
179 | | - echo "node=node_${node/.*.*/}" >> $GITHUB_OUTPUT |
180 | | - echo "node=node_${node/.*.*/}" >> $env:GITHUB_OUTPUT |
181 | | - shell: bash |
182 | | - |
183 | | - - name: Store npm error artefacts |
184 | | - uses: actions/upload-artifact@v4 |
185 | | - if: always() |
186 | | - with: |
187 | | - name: npm-logs--windows-2025--23x |
188 | | - path: | |
189 | | - ~/.npm/_logs/**/* |
190 | | -
|
191 | | - - uses: codecov/codecov-action@v5 |
192 | | - continue-on-error: true |
193 | | - with: |
194 | | - flags: ${{ steps.test-coverage-flags.outputs.os }},${{ steps.test-coverage-flags.outputs.node }} |
195 | | - token: ${{ secrets.CODECOV_TOKEN }} |
0 commit comments