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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
53 changes: 41 additions & 12 deletions site/.vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,54 @@
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<typeof defineConfig>['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:
'Type-safe Aeternity blockchain interactions for React, Vue, and Solid',
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: [
Expand Down
3 changes: 3 additions & 0 deletions test/config/aeternity.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ chain:
persist: false
hard_forks:
"1": 0
genesis_accounts:
ak_2CuofqWZHrABCrM7GY95YSQn8PyFvKQadnvFnpwhjUnDCFAWmf: 100000000000000000000000000000
ak_tWZrf8ehmY7CyB1JAoBmWJEeThwWnDpU4NadUdzxVSbzDgKjP: 100000000000000000000000000000

mining:
autostart: true
Expand Down
5 changes: 4 additions & 1 deletion test/integration/spend.integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 genesis-funded account from test/config/aeternity.yaml — receives the spend tx
const RECIPIENT = 'ak_tWZrf8ehmY7CyB1JAoBmWJEeThwWnDpU4NadUdzxVSbzDgKjP'

describe.skipIf(!process.env.INTEGRATION)('spend (integration)', () => {
beforeAll(async () => {
await waitForNode()
Expand All @@ -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',
})

Expand Down
7 changes: 4 additions & 3 deletions test/setup/integration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ export const devnet: Network = {
id: 'ae_devnet',
name: 'Local Devnet',
nodeUrl: 'http://localhost:3013',
networkId: 'ae_devnet',
}

// 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 =
'e6a91d633c77cf5771329d3571e1b97e4b6a8da1f92dec562e713ca30fba722c0fc9aa4e782fbd71af7de0a7b40ced95e03b73cb57d0fcf06a54c75ce36f01f02'
'sk_2CuofqWZHrABCrM7GY95YSQn8PyFvKQadnvFnpwhjUnDCFAWmf'
export const FAUCET_PUBLIC_KEY =
'ak_2mwRmUeYmfuW93ti9HMSUJzCk1EYcQEfikVSzgo6k2VghsWhgU'
'ak_2CuofqWZHrABCrM7GY95YSQn8PyFvKQadnvFnpwhjUnDCFAWmf'

export function createTestConfig() {
return createConfig({
Expand Down
Loading