Skip to content

Commit 4ebe334

Browse files
committed
bughunt probe: npm e2e on windows/macos
1 parent f6b7fb9 commit 4ebe334

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

‎.github/workflows/bughunt-npm.yml‎

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: bughunt-npm
2+
on:
3+
push:
4+
branches: ['bughunt/npm/**']
5+
permissions:
6+
contents: read
7+
jobs:
8+
npm-e2e:
9+
name: ${{ matrix.os }} npm ${{ matrix.npm }}
10+
runs-on: ${{ matrix.os }}
11+
timeout-minutes: 45
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
os: [windows-latest, macos-latest]
16+
npm: ['10.9.9', '12.1.0']
17+
steps:
18+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
19+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
20+
with:
21+
node-version: '24.15.0'
22+
- name: Install npm under test
23+
shell: bash
24+
run: |
25+
npm install --prefix "$RUNNER_TEMP/npm-tool" --no-audit --no-fund "npm@${{ matrix.npm }}"
26+
if [ "$RUNNER_OS" = "Windows" ]; then BIN="$RUNNER_TEMP/npm-tool/node_modules/.bin/npm.cmd"; else BIN="$RUNNER_TEMP/npm-tool/node_modules/.bin/npm"; fi
27+
"$BIN" --version
28+
echo "SOCKET_PATCH_NPM_E2E_BIN=$BIN" >> "$GITHUB_ENV"
29+
- name: Real-npm hosted + vendored e2e
30+
shell: bash
31+
env:
32+
SOCKET_PATCH_NPM_E2E_VERSION: ${{ matrix.npm }}
33+
SOCKET_PATCH_NPM_E2E_REQUIRED: '1'
34+
run: |
35+
cargo test -p socket-patch-cli --test e2e_redirect_npm_build --test e2e_vendor_npm_build -- --include-ignored --test-threads 2 2>&1 | tee e2e.log
36+
exit "${PIPESTATUS[0]}"
37+
- name: Print failures
38+
if: failure()
39+
shell: bash
40+
run: grep -n -E "panicked|FAILED|failures:|assert|Error|error\[" e2e.log | head -200 || true

0 commit comments

Comments
 (0)