Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions .github/workflows/privacy-e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Testnet Privacy E2E Test (Nightly)

# Runs at 04:00 UTC every day (following the 03:00 smoke test)
# Skips on dependabot branches
on:
schedule:
- cron: '0 4 * * *'
workflow_dispatch: {}
pull_request:
paths:
- 'scripts/privacy-e2e.mjs'
- 'frontend/wallet/lib/privacy/**'
- 'frontend/wallet/e2e/privacy.spec.ts'
- '.github/workflows/privacy-e2e.yml'

jobs:
privacy-e2e:
name: Stellar testnet — shield, private send, unshield
runs-on: ubuntu-latest
if: ${{ !startsWith(github.head_ref, 'dependabot/') }}

steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: '20'

# ── Install stellar-sdk dependency for the script ───────────────────────
- name: Install dependencies
run: npm install @stellar/stellar-sdk

# ── Run End-to-End Privacy Test ─────────────────────────────────────────
- name: Run Privacy E2E Test
env:
HORIZON_URL: https://horizon-testnet.stellar.org
run: node scripts/privacy-e2e.mjs

# ── Notify on failure: Open GitHub Issue ────────────────────────────────
- name: Open GitHub issue on failure
if: failure()
uses: actions/github-script@v7
with:
script: |
const title = `Nightly privacy E2E test failed — ${new Date().toISOString().slice(0, 10)}`;
const body = [
'## Nightly Privacy E2E Test Failure',
'',
`**Run:** https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`,
'',
'The testnet privacy round-trip test failed.',
'Pipeline: Fund 2 wallets via Friendbot → Shield XLM → Private Send → Unshield → Invariant verification.',
'',
'**Triage checklist:**',
'- [ ] Is Friendbot healthy? <https://friendbot.stellar.org>',
'- [ ] Is Horizon testnet healthy? <https://horizon-testnet.stellar.org>',
'- [ ] Check step failure log for the exact broken step.',
].join('\n');

const today = new Date().toISOString().slice(0, 10);
const existing = await github.rest.issues.listForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open',
labels: 'testnet-smoke-failure',
});
const alreadyOpen = existing.data.some((i) => i.title.includes(today));
if (alreadyOpen) {
console.log('Issue for today already exists — skipping.');
return;
}

await github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title,
body,
labels: ['testnet-smoke-failure', 'privacy', 'ci'],
});
260 changes: 220 additions & 40 deletions demo/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading