From 79f036b3874755ad21146871442783e2e2157286 Mon Sep 17 00:00:00 2001 From: Badi Ifaoui Date: Thu, 2 Apr 2026 12:31:13 +0100 Subject: [PATCH 1/4] chore: enable integration tests on prs --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a243a18..b4112a4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -91,7 +91,7 @@ jobs: integration: name: Integration Tests runs-on: ubuntu-latest - if: contains(github.event.pull_request.labels.*.name, 'integration') || github.ref == 'refs/heads/main' + if: contains(github.event.pull_request.labels.*.name, 'integration') || github.ref == 'refs/heads/main' || (github.event_name == 'pull_request' && github.base_ref == 'develop') needs: build timeout-minutes: 15 services: From 34c668ce4a825f378fe2666fdd07763024f2e876 Mon Sep 17 00:00:00 2001 From: Badi Ifaoui Date: Thu, 2 Apr 2026 12:44:07 +0100 Subject: [PATCH 2/4] fix(tests): update spend integration test recipient and modify faucet keys --- test/integration/spend.integration.test.ts | 5 ++++- test/setup/integration.ts | 7 ++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/test/integration/spend.integration.test.ts b/test/integration/spend.integration.test.ts index 657d120..a6098a5 100644 --- a/test/integration/spend.integration.test.ts +++ b/test/integration/spend.integration.test.ts @@ -3,6 +3,9 @@ import { connect } from '../../packages/core/src/actions/connect' import { spend } from '../../packages/core/src/actions/spend' import { createTestConfig, waitForNode } from '../setup/integration' +// Second well-known devmode account — receives the spend tx +const RECIPIENT = 'ak_tWZrf8ehmY7CyB1JAoBmWJEeThwWnDpU4NadUdzxVSbzDgKjP' + describe.skipIf(!process.env.INTEGRATION)('spend (integration)', () => { beforeAll(async () => { await waitForNode() @@ -14,7 +17,7 @@ describe.skipIf(!process.env.INTEGRATION)('spend (integration)', () => { await connect(config, { connector }) const result = await spend(config, { - recipient: 'ak_2mwRmUeYmfuW93ti9HMSUJzCk1EYcQEfikVSzgo6k2VghsWhgU', + recipient: RECIPIENT, amount: '1000000000000000000', }) diff --git a/test/setup/integration.ts b/test/setup/integration.ts index e00231e..a8d9ec9 100644 --- a/test/setup/integration.ts +++ b/test/setup/integration.ts @@ -6,13 +6,14 @@ export const devnet: Network = { id: 'ae_devnet', name: 'Local Devnet', nodeUrl: 'http://localhost:3013', - networkId: 'ae_devnet', } +// Well-known genesis-funded devmode account (sk_base58 format, 100M AE pre-funded). +// Source: aeproject default accounts / aeternity-playground devmode accounts. export const FAUCET_SECRET_KEY = - 'e6a91d633c77cf5771329d3571e1b97e4b6a8da1f92dec562e713ca30fba722c0fc9aa4e782fbd71af7de0a7b40ced95e03b73cb57d0fcf06a54c75ce36f01f02' + 'sk_woRkv1SfE49sCNbmkHGLUdzPsH82kVGhTPTWebH8Ysk2MqQSh' export const FAUCET_PUBLIC_KEY = - 'ak_2mwRmUeYmfuW93ti9HMSUJzCk1EYcQEfikVSzgo6k2VghsWhgU' + 'ak_fUq2NesPXcYZ1CcqBcGC3StpdnQw3iVxMA3YSeCNAwfN4myQk' export function createTestConfig() { return createConfig({ From cbf709053b7e026f2553afa08c7baa2ccab20e46 Mon Sep 17 00:00:00 2001 From: Badi Ifaoui Date: Thu, 2 Apr 2026 13:00:18 +0100 Subject: [PATCH 3/4] feat(tests): add genesis accounts to configuration and update related test references --- test/config/aeternity.yaml | 3 +++ test/integration/spend.integration.test.ts | 2 +- test/setup/integration.ts | 8 ++++---- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/test/config/aeternity.yaml b/test/config/aeternity.yaml index 2d4ecdb..aee00f9 100644 --- a/test/config/aeternity.yaml +++ b/test/config/aeternity.yaml @@ -6,6 +6,9 @@ chain: persist: false hard_forks: "1": 0 + genesis_accounts: + ak_2CuofqWZHrABCrM7GY95YSQn8PyFvKQadnvFnpwhjUnDCFAWmf: 100000000000000000000000000000 + ak_tWZrf8ehmY7CyB1JAoBmWJEeThwWnDpU4NadUdzxVSbzDgKjP: 100000000000000000000000000000 mining: autostart: true diff --git a/test/integration/spend.integration.test.ts b/test/integration/spend.integration.test.ts index a6098a5..5cfb78b 100644 --- a/test/integration/spend.integration.test.ts +++ b/test/integration/spend.integration.test.ts @@ -3,7 +3,7 @@ import { connect } from '../../packages/core/src/actions/connect' import { spend } from '../../packages/core/src/actions/spend' import { createTestConfig, waitForNode } from '../setup/integration' -// Second well-known devmode account — receives the spend tx +// Second genesis-funded account from test/config/aeternity.yaml — receives the spend tx const RECIPIENT = 'ak_tWZrf8ehmY7CyB1JAoBmWJEeThwWnDpU4NadUdzxVSbzDgKjP' describe.skipIf(!process.env.INTEGRATION)('spend (integration)', () => { diff --git a/test/setup/integration.ts b/test/setup/integration.ts index a8d9ec9..9ec79cc 100644 --- a/test/setup/integration.ts +++ b/test/setup/integration.ts @@ -8,12 +8,12 @@ export const devnet: Network = { nodeUrl: 'http://localhost:3013', } -// Well-known genesis-funded devmode account (sk_base58 format, 100M AE pre-funded). -// Source: aeproject default accounts / aeternity-playground devmode accounts. +// Genesis-funded account — pre-funded in test/config/aeternity.yaml genesis_accounts. +// Same account used by aepp-sdk-js integration tests. export const FAUCET_SECRET_KEY = - 'sk_woRkv1SfE49sCNbmkHGLUdzPsH82kVGhTPTWebH8Ysk2MqQSh' + 'sk_2CuofqWZHrABCrM7GY95YSQn8PyFvKQadnvFnpwhjUnDCFAWmf' export const FAUCET_PUBLIC_KEY = - 'ak_fUq2NesPXcYZ1CcqBcGC3StpdnQw3iVxMA3YSeCNAwfN4myQk' + 'ak_2CuofqWZHrABCrM7GY95YSQn8PyFvKQadnvFnpwhjUnDCFAWmf' export function createTestConfig() { return createConfig({ From f3614d2c1652b22802374c75f32f7e0ec9c412bb Mon Sep 17 00:00:00 2001 From: Badi Ifaoui Date: Wed, 8 Apr 2026 08:33:49 +0100 Subject: [PATCH 4/4] feat(config): enhance VitePress configuration with environment variable loading and structured head entries --- site/.vitepress/config.ts | 53 ++++++++++++++++++++++++++++++--------- 1 file changed, 41 insertions(+), 12 deletions(-) diff --git a/site/.vitepress/config.ts b/site/.vitepress/config.ts index 82fac36..0779f62 100644 --- a/site/.vitepress/config.ts +++ b/site/.vitepress/config.ts @@ -1,6 +1,46 @@ +import { readFileSync } from 'node:fs' +import { resolve } from 'node:path' import { defineConfig } from 'vitepress' import type { DefaultTheme } from 'vitepress' +function loadEnvVar(name: string): string { + const fromEnv = process.env[name] + if (fromEnv) return fromEnv + try { + const envFile = readFileSync(resolve(__dirname, '../.env'), 'utf-8') + const match = envFile.match(new RegExp(`^${name}=(.+)$`, 'm')) + return match?.[1]?.trim() || '' + } catch { + return '' + } +} + +const plausibleDomain = + loadEnvVar('VITE_PLAUSIBLE_DOMAIN') || 'reactive.growae.io' +const plausibleHost = + loadEnvVar('VITE_PLAUSIBLE_ENDPOINT') || 'https://plausible.growae.io' + +const headEntries: ReturnType['head'] = [ + ['meta', { property: 'og:title', content: 'Reactive' }], + [ + 'meta', + { + property: 'og:description', + content: 'Type-safe Aeternity blockchain interactions', + }, + ], + ['meta', { property: 'og:type', content: 'website' }], + ['link', { rel: 'stylesheet', href: '/styles/custom.css' }], + [ + 'script', + { + defer: '', + 'data-domain': plausibleDomain, + src: `${plausibleHost.replace(/\/+$/, '')}/js/script.js`, + }, + ], +] + export default defineConfig({ title: 'Reactive', description: @@ -8,18 +48,7 @@ export default defineConfig({ cleanUrls: true, lastUpdated: true, - head: [ - ['meta', { property: 'og:title', content: 'Reactive' }], - [ - 'meta', - { - property: 'og:description', - content: 'Type-safe Aeternity blockchain interactions', - }, - ], - ['meta', { property: 'og:type', content: 'website' }], - ['link', { rel: 'stylesheet', href: '/styles/custom.css' }], - ], + head: headEntries as any, themeConfig: { nav: [