This commit is contained in:
parent
47d302a9a4
commit
45992c4f91
10 changed files with 670 additions and 13 deletions
|
|
@ -15,6 +15,35 @@ jobs:
|
|||
build-deploy:
|
||||
runs-on: arch-latest
|
||||
steps:
|
||||
- name: Check live payment test credentials
|
||||
# The live-provider suites (ShouldCreateMollieTestPayments,
|
||||
# ShouldSettleEurcOnTestnet) are mandatory deploy gates, so a missing
|
||||
# or malformed secret fails HERE, before any build time is spent —
|
||||
# never as a silent skip. Secrets live in Forgejo: repo Settings ->
|
||||
# Actions -> Secrets. See deploy/README.md "Live payment suites in CI"
|
||||
# for what each one is and how to fund the testnet wallet.
|
||||
env:
|
||||
MOLLIE_TEST_API_KEY: ${{ secrets.MOLLIE_TEST_API_KEY }}
|
||||
EURC_E2E_PRIVATE_KEY: ${{ secrets.EURC_E2E_PRIVATE_KEY }}
|
||||
run: |
|
||||
set -eu
|
||||
ok=1
|
||||
if [ -z "${MOLLIE_TEST_API_KEY:-}" ]; then
|
||||
echo "ERROR: MOLLIE_TEST_API_KEY secret is not set (Mollie dashboard -> Developers -> API keys, the test_ one)." >&2
|
||||
ok=0
|
||||
else
|
||||
case "$MOLLIE_TEST_API_KEY" in
|
||||
test_*) ;;
|
||||
*) echo "ERROR: MOLLIE_TEST_API_KEY is not a test_ key — the suite refuses to create payments on a live key." >&2; ok=0 ;;
|
||||
esac
|
||||
fi
|
||||
if [ -z "${EURC_E2E_PRIVATE_KEY:-}" ]; then
|
||||
echo "ERROR: EURC_E2E_PRIVATE_KEY secret is not set (a Base Sepolia key holding testnet EURC + gas)." >&2
|
||||
ok=0
|
||||
fi
|
||||
[ "$ok" = 1 ] || exit 1
|
||||
echo "Live payment test credentials are present."
|
||||
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
# Same keyring bootstrap the Crafter.Build CI does: the slim
|
||||
|
|
@ -63,6 +92,19 @@ jobs:
|
|||
cp -r /tmp/cb/share/crafter-build /usr/share/
|
||||
crafter-build --version || true
|
||||
|
||||
- name: Install cast (Foundry)
|
||||
# The ShouldSettleEurcOnTestnet gate pays its own test order with a
|
||||
# real ERC-20 transfer on Base Sepolia, and cast is the only tool a
|
||||
# stock shell has that can sign one — the server deliberately cannot,
|
||||
# that is the EURC rail's design. Extracted alone: forge/anvil/chisel
|
||||
# are dead weight here.
|
||||
run: |
|
||||
set -eux
|
||||
url="https://github.com/foundry-rs/foundry/releases/download/stable/foundry_stable_linux_amd64.tar.gz"
|
||||
curl -fsSL "$url" -o /tmp/foundry.tar.gz
|
||||
tar -xzf /tmp/foundry.tar.gz -C /usr/local/bin cast
|
||||
cast --version
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
|
|
@ -144,11 +186,19 @@ jobs:
|
|||
# E2E_MEDIA_DIR points ShouldServePostPages at the mirror mount, where
|
||||
# the media files actually are.
|
||||
#
|
||||
# The two payment secrets feed the live-provider suites, which run as
|
||||
# part of this same gate: a deploy that cannot create a Mollie test
|
||||
# payment or settle a testnet EURC transfer does not ship. If the
|
||||
# EURC suite fails at `cast send`, the testnet wallet is empty — see
|
||||
# deploy/README.md "Live payment suites in CI" for the faucets.
|
||||
#
|
||||
# Same refuse-to-guess rule as the wasm bundle below: a variant
|
||||
# directory embeds a config hash, so more than one match means the tree
|
||||
# is ambiguous and picking the first would deploy an arbitrary build.
|
||||
env:
|
||||
E2E_MEDIA_DIR: ${{ steps.media.outputs.dir }}
|
||||
MOLLIE_TEST_API_KEY: ${{ secrets.MOLLIE_TEST_API_KEY }}
|
||||
EURC_E2E_PRIVATE_KEY: ${{ secrets.EURC_E2E_PRIVATE_KEY }}
|
||||
run: |
|
||||
set -eux
|
||||
crafter-build --product=server
|
||||
|
|
|
|||
Loading…
Reference in a new issue