fix(admin): node search now lists results (response-key + field-name … #112
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Tests | |
| on: | |
| push: | |
| branches: [master, main] | |
| pull_request: | |
| branches: [master, main] | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| node-version: [20, 22] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Run smoke tests | |
| run: npm test | |
| - name: Verify all modules import | |
| run: node -e "import('./index.js').then(m => { const n = Object.keys(m).length; console.log(n + ' exports OK'); if (n < 50) process.exit(1); })" | |
| - name: Verify server starts (Windows) | |
| if: matrix.os == 'windows-latest' | |
| run: | | |
| $job = Start-Job -ScriptBlock { Set-Location $using:PWD; $env:PORT='3098'; node server.js 2>&1 } | |
| Start-Sleep -Seconds 5 | |
| $response = Invoke-WebRequest -Uri http://localhost:3098/api/stats -UseBasicParsing | |
| if ($response.StatusCode -ne 200) { exit 1 } | |
| Write-Host "Server API responded: $($response.StatusCode)" | |
| Stop-Job $job | |
| shell: pwsh | |
| - name: Verify server starts (Linux/macOS) | |
| if: matrix.os != 'windows-latest' | |
| run: | | |
| PORT=3098 node server.js & | |
| SERVER_PID=$! | |
| sleep 5 | |
| if curl -sf http://localhost:3098/api/stats > /dev/null; then | |
| echo "Server API responded OK" | |
| else | |
| echo "Server API did not respond" | |
| kill -9 $SERVER_PID || true | |
| exit 1 | |
| fi | |
| kill $SERVER_PID || true | |
| shell: bash |