Files
openpayments-mock/.gitea/workflows/ci.yaml
T
argoyle 898023c794
openpayments-mock / check (push) Has been skipped
openpayments-mock / vulnerabilities (push) Has been skipped
openpayments-mock / build (push) Failing after 1m8s
feat: Open Payments aggregator mock for acctest
Tiny in-memory stand-in for the Open Payments PSD2/BerlinGroup
aggregator, extracted from acctest where it lived inline (which
couldn't docker-build on the self-hosted CI runner — /.docker/buildx
was read-only). A separate repo:

- lets the mock build + publish its image via the standard shiny CI
  flow, pulled like any other service
- keeps acctest focused on test infra, not service source
- gives the mock its own versioned release lifecycle

**Endpoints** (see README for the full list)
- OAuth: POST /token → canned bearer token.
- AIS: aspsps catalog, consent lifecycle, /authorize self-redirect SCA
  stub, payment + card accounts + transactions.
- PIS: sepa-credit-transfers initiate + status (RCVD → PDNG → ACSC;
  creditor name 'REJECT ME' → RJCT), signing baskets (RCVD → ACCP →
  ACSC; basket ACSC advances all linked payments).
- Admin: /admin/* endpoints let acctest force deterministic
  transitions, seed transactions, reset state, override consent
  expiry.

**CI**
Standard shiny ci.yaml: check (go build + vet), vulnerabilities
(govulncheck), build (buildtools publishes oci.unbound.se/shiny/
openpayments-mock:${COMMIT}). No deploy job — image is consumed by
acctest only.

**k8s/deploy.yaml**
Deployment + Service on port 8080 with /healthz readiness/liveness.
acctest's infra manifest will reference the published tag.
2026-04-20 22:11:12 +02:00

70 lines
1.9 KiB
YAML

name: openpayments-mock
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
check:
if: gitea.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: 'stable'
- name: Build
run: go build ./...
- name: Vet
run: go vet ./...
vulnerabilities:
if: gitea.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: 'stable'
- name: Check vulnerabilities
run: |
go install golang.org/x/vuln/cmd/govulncheck@latest
govulncheck ./...
build:
runs-on: ubuntu-latest
env:
BUILDTOOLS_CONTENT: ${{ secrets.BUILDTOOLS_CONTENT }}
GITEA_REPOSITORY: ${{ gitea.repository }}
steps:
- uses: actions/checkout@v6
- uses: buildtool/setup-buildtools-action@v1
- name: Build and push
run: unset GITEA_TOKEN && build && push
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: deployment-artifacts
path: release/
retention-days: 30
- name: Trigger acceptance tests
if: gitea.event_name == 'pull_request'
env:
GITEA_TOKEN: ${{ secrets.ACCTEST_TOKEN }}
GITEA_URL: ${{ gitea.server_url }}
run: |
curl --fail-with-body -X POST \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"ref": "main",
"inputs": {
"trigger_repo": "openpayments-mock",
"trigger_commit": "${{ gitea.sha }}",
"trigger_run": "${{ gitea.run_id }}"
}
}' \
"${GITEA_URL}/api/v1/repos/shiny/acctest/actions/workflows/ci.yaml/dispatches"