Skip to content

Commit 1dfe296

Browse files
feat(ci): Add Radicle integration workflow
- Test Radicle installation on macOS and Linux - Create test identity with RAD_PASSPHRASE - Verify basic rad operations (init, self) - Test Windows rad CLI build from source - Falls back to source build if official installer fails
1 parent 33a11ae commit 1dfe296

1 file changed

Lines changed: 125 additions & 0 deletions

File tree

.github/workflows/radicle.yml

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
name: Radicle Integration
2+
3+
on:
4+
push:
5+
branches: [main, 'epic/*', 'feature/*']
6+
paths:
7+
- 'src/features/social-resonance-filter/**'
8+
- 'src/features/dreamnode-updater/**'
9+
- 'install.sh'
10+
- '.github/workflows/radicle.yml'
11+
pull_request:
12+
branches: [main]
13+
paths:
14+
- 'src/features/social-resonance-filter/**'
15+
- 'src/features/dreamnode-updater/**'
16+
- 'install.sh'
17+
- '.github/workflows/radicle.yml'
18+
# Allow manual trigger for testing
19+
workflow_dispatch:
20+
21+
jobs:
22+
radicle-unix:
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
os: [ubuntu-latest, macos-latest]
27+
28+
runs-on: ${{ matrix.os }}
29+
timeout-minutes: 20
30+
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v4
34+
35+
- name: Install Radicle
36+
run: |
37+
echo "Installing Radicle on ${{ matrix.os }}..."
38+
39+
# Try official installer first
40+
if curl -sSf https://radicle.xyz/install | sh; then
41+
echo "Official installer succeeded"
42+
else
43+
echo "Official installer failed, building from source..."
44+
45+
# Install Rust if needed
46+
if ! command -v cargo &> /dev/null; then
47+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
48+
source "$HOME/.cargo/env"
49+
fi
50+
51+
# Build from source
52+
cargo install radicle-cli --git https://github.com/radicle-dev/heartwood --locked
53+
fi
54+
55+
# Add to PATH
56+
echo "$HOME/.radicle/bin" >> $GITHUB_PATH
57+
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
58+
timeout-minutes: 15
59+
60+
- name: Verify Radicle installation
61+
run: |
62+
rad --version
63+
echo "Radicle CLI installed successfully"
64+
65+
- name: Create test identity
66+
env:
67+
RAD_PASSPHRASE: ci-test-passphrase-123
68+
run: |
69+
rad auth --alias "CI-Test-${{ matrix.os }}"
70+
71+
echo "Identity created:"
72+
rad self --did
73+
rad self --alias
74+
timeout-minutes: 2
75+
76+
- name: Test basic rad operations
77+
env:
78+
RAD_PASSPHRASE: ci-test-passphrase-123
79+
run: |
80+
# Create a test repo
81+
mkdir -p /tmp/test-dreamnode
82+
cd /tmp/test-dreamnode
83+
84+
git init
85+
git config user.email "ci@test.local"
86+
git config user.name "CI Test"
87+
git commit --allow-empty -m "Initial commit"
88+
89+
# Initialize as Radicle repo
90+
rad init --private --default-branch main --name "CI-Test-Node" --description "Test node for CI"
91+
92+
# Verify it worked
93+
rad .
94+
95+
echo "Radicle repo initialized successfully"
96+
timeout-minutes: 3
97+
98+
radicle-windows-cli:
99+
runs-on: windows-latest
100+
timeout-minutes: 25
101+
102+
steps:
103+
- name: Checkout
104+
uses: actions/checkout@v4
105+
106+
- name: Install Rust
107+
uses: dtolnay/rust-action@stable
108+
with:
109+
toolchain: stable
110+
111+
- name: Build Radicle CLI from source
112+
run: |
113+
cargo install radicle-cli --git https://github.com/radicle-dev/heartwood --locked
114+
timeout-minutes: 20
115+
116+
- name: Test rad CLI basics
117+
run: |
118+
rad --version
119+
rad --help
120+
121+
echo "### Windows Radicle CLI Test Results" >> $env:GITHUB_STEP_SUMMARY
122+
echo "- rad --version: PASS" >> $env:GITHUB_STEP_SUMMARY
123+
echo "- rad --help: PASS" >> $env:GITHUB_STEP_SUMMARY
124+
echo "" >> $env:GITHUB_STEP_SUMMARY
125+
echo "Note: Full Radicle node requires WSL on Windows" >> $env:GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)