-
Notifications
You must be signed in to change notification settings - Fork 12
69 lines (59 loc) · 2.29 KB
/
Copy pathci-smoke-preprod.yml
File metadata and controls
69 lines (59 loc) · 2.29 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
name: CI Smoke (Preprod)
on:
pull_request:
branches: [main, preprod]
deployment_status:
workflow_dispatch:
env:
API_BASE_URL: ${{ secrets.SMOKE_API_BASE_URL }}
SIGNER_MNEMONIC_1: ${{ secrets.SMOKE_SIGNER_MNEMONIC_1 }}
SIGNER_MNEMONIC_2: ${{ secrets.SMOKE_SIGNER_MNEMONIC_2 }}
BOT_MNEMONIC: ${{ secrets.SMOKE_BOT_MNEMONIC }}
BOT_KEY_ID: ${{ secrets.SMOKE_BOT_KEY_ID }}
BOT_SECRET: ${{ secrets.SMOKE_BOT_SECRET }}
jobs:
smoke:
runs-on: ubuntu-latest
timeout-minutes: 15
# For deployment_status triggers, only run when Railway reports a
# successful deploy to the preprod environment. Other events always run.
if: >-
github.event_name != 'deployment_status' ||
(github.event.deployment_status.state == 'success' &&
github.event.deployment.creator.login == 'railway-app[bot]' &&
contains(github.event.deployment.environment, 'preprod'))
steps:
- uses: actions/checkout@v6
with:
# On deployment_status, check out the exact SHA that was deployed.
ref: ${{ github.event.deployment.sha || github.sha }}
- uses: actions/setup-node@v6
with:
node-version: 22
- name: Use repo npm version
run: npm install -g "$(node -p 'require("./package.json").packageManager')" && npm --version
- name: Check secrets configured
id: check-secrets
run: |
if [ -z "$API_BASE_URL" ]; then
echo "configured=false" >> "$GITHUB_OUTPUT"
echo "Smoke test skipped: SMOKE_* secrets not configured."
else
echo "configured=true" >> "$GITHUB_OUTPUT"
fi
- name: Install dependencies
if: steps.check-secrets.outputs.configured == 'true'
run: npm ci
- name: Stage 1 - Bootstrap wallets
if: steps.check-secrets.outputs.configured == 'true'
run: npx tsx scripts/ci-smoke/create-wallets.ts
- name: Stage 2 - Run route chain
if: steps.check-secrets.outputs.configured == 'true'
run: npx tsx scripts/ci-smoke/run-route-chain.ts
- name: Upload smoke artifacts
uses: actions/upload-artifact@v7
if: always() && steps.check-secrets.outputs.configured == 'true'
with:
name: smoke-report
path: ci-artifacts/
retention-days: 14