feat: Handle 202 Accepted from /charge endpoint #525
Workflow file for this run
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: Node.js Tests | |
| on: | |
| pull_request: | |
| branches: [ main ] | |
| push: | |
| branches: [ main ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| # Add Redis service for integration tests | |
| services: | |
| redis: | |
| image: redis:7-alpine | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22.x' | |
| cache: 'npm' | |
| registry-url: 'https://registry.npmjs.org' # Added this line | |
| - name: Install dependencies with rollup workaround | |
| run: npm ci --include=optional | |
| continue-on-error: true | |
| id: npm-ci | |
| env: | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: Fallback install if npm ci failed | |
| if: steps.npm-ci.outcome == 'failure' | |
| run: | | |
| echo "npm ci failed, applying rollup optional dependency workaround..." | |
| npm cache clean --force | |
| rm -rf node_modules package-lock.json | |
| npm install --include=optional | |
| env: | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: Run build | |
| run: npm run build | |
| - name: Run typecheck | |
| run: npm run typecheck | |
| - name: Run lint | |
| run: npm run lint | |
| - name: Verify Rollup installation | |
| run: | | |
| echo "Checking for Rollup platform binaries..." | |
| ls -la node_modules/@rollup/ | grep rollup- || echo "No @rollup packages found in root" | |
| echo "Checking Rollup version..." | |
| npm ls rollup || true | |
| - name: Run tests | |
| run: npm test | |
| - name: Install Redis CLI | |
| run: sudo apt-get update && sudo apt-get install -y redis-tools | |
| - name: Verify Redis is running | |
| run: | | |
| echo "Checking Redis connection..." | |
| redis-cli -h localhost -p 6379 ping | |
| echo "✅ Redis service is healthy and responsive" | |
| echo "Redis info:" | |
| redis-cli -h localhost -p 6379 info server | head -10 | |
| - name: Run Redis integration tests | |
| run: npm run test:integration | |
| env: | |
| REDIS_URL: redis://localhost:6379 | |