test(x402-seller): verify payment response cache controls (#55) #152
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: ci | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| id-token: write | |
| jobs: | |
| ci: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node: [22, 24] | |
| x402-foundation: [locked, latest] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - uses: pnpm/action-setup@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: pnpm | |
| - name: Install | |
| run: pnpm install --frozen-lockfile | |
| - name: Override @x402/* foundation packages to latest 2.x | |
| if: matrix.x402-foundation == 'latest' | |
| run: | | |
| pnpm -r update \ | |
| '@x402/core@latest' \ | |
| '@x402/evm@latest' \ | |
| '@x402/express@latest' \ | |
| '@x402/extensions@latest' \ | |
| '@x402/fastify@latest' \ | |
| '@x402/hono@latest' \ | |
| '@x402/next@latest' \ | |
| '@x402/paywall@latest' \ | |
| '@x402/svm@latest' | |
| - name: Lint | |
| run: pnpm lint | |
| - name: Typecheck | |
| run: pnpm typecheck | |
| - name: Build | |
| run: pnpm build | |
| - name: Check exports map | |
| run: pnpm check-exports | |
| - name: Verify publish tarballs | |
| run: pnpm verify-publish | |
| - name: Test | |
| run: pnpm test | |
| - name: TAP conformance | |
| if: matrix.x402-foundation == 'locked' && matrix.node == 22 | |
| run: pnpm tap:conformance | |
| - name: Changed-line coverage | |
| if: github.event_name == 'pull_request' && matrix.x402-foundation == 'locked' && matrix.node == 22 | |
| run: pnpm coverage:changed | |
| - name: Changeset check | |
| if: | |
| github.event_name == 'pull_request' && github.head_ref != 'changeset-release/main' && matrix.x402-foundation | |
| == 'locked' | |
| run: pnpm changeset status --since=origin/main | |
| - name: Upload coverage to Codecov | |
| if: matrix.x402-foundation == 'locked' && matrix.node == 22 | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| use_oidc: true | |
| files: >- | |
| packages/mpp/coverage/lcov.info,packages/mpp-buyer/coverage/lcov.info,packages/mpp-seller/coverage/lcov.info,packages/tap-seller/coverage/lcov.info,packages/x402/coverage/lcov.info,packages/x402-buyer/coverage/lcov.info,packages/x402-seller/coverage/lcov.info | |
| - name: Upload coverage | |
| if: matrix.x402-foundation == 'locked' | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: coverage-report-node${{ matrix.node }} | |
| path: packages/*/coverage | |
| retention-days: 7 |