Repository navigation
82 lines (79 loc) · 2.84 KB
/
Copy pathruby.yml
File metadata and controls
82 lines (79 loc) · 2.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Ruby
on:
push:
branches: [main]
pull_request:
workflow_call:
jobs:
test-ruby:
name: Ruby tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
bundler-cache: true
working-directory: ruby
- name: Validate gemspec
working-directory: ruby
run: bundle exec ruby -e "Gem::Specification.load('solana-pay-kit.gemspec').validate"
- name: Lint
working-directory: ruby
run: bundle exec standardrb
- name: Audit dependencies
working-directory: ruby
run: bundle exec bundle-audit check --update
- name: Run tests with coverage
working-directory: ruby
env:
SURFPOOL_REPORT: "1"
run: COVERAGE=1 bundle exec ruby -Itest test/run.rb
- name: Upload Ruby coverage
if: always()
uses: actions/upload-artifact@v7
with:
name: ruby-coverage
path: ruby/coverage/.resultset.json
- name: Upload Ruby surfpool report data
if: always()
uses: actions/upload-artifact@v7
with:
name: surfpool-reports-ruby
path: ruby/target/surfpool-reports/
if-no-files-found: ignore
harness-ruby:
name: "Harness: Ruby PayKit server (dual protocol)"
needs: test-ruby
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
bundler-cache: true
working-directory: ruby
- uses: ./.github/actions/setup-harness
with:
cargo-bins: "paykit-harness-bins:x402_harness_client"
cargo-cache-key: ruby
# Dual-protocol proof: one e2e run drives MPP charge scenarios
# (typescript client) and x402 exact (rust-x402 client) against
# the same ruby adapter binary. The harness's harnessEnv exposes
# X402_HARNESS_* shadows alongside MPP_HARNESS_* (same surfpool,
# same funded keypairs) and stamps every scenario with
# PAY_KIT_HARNESS_PROTOCOL so the dual-protocol adapter binds the
# right protocol per scenario without relying on env namespace
# probing. ts-x402 is intentionally excluded - it is a wire-only
# fixture whose payload omits the on-chain transaction, so it can
# only pair against the matching wire-only ts-x402 server, not a
# real settle server.
- name: Run harness smoke (mpp charge + x402 exact)
working-directory: harness
env:
MPP_HARNESS_CLIENTS: typescript
MPP_HARNESS_SERVERS: ruby,typescript
MPP_HARNESS_INTENTS: charge,x402-exact
X402_HARNESS_CLIENTS: rust-x402
X402_HARNESS_SERVERS: ""
run: pnpm exec vitest run test/e2e.test.ts --testNamePattern "ruby" --testTimeout 180000