Skip to content
This repository was archived by the owner on May 22, 2026. It is now read-only.

Repository files navigation

Autonomi GitHub Actions

Reusable GitHub Actions for testing and managing Autonomi networks. These actions provide an easy way to spin up local Autonomi testnets with EVM support for CI/CD pipelines.

Actions

🚀 spawn-autonomi-network

Starts a local Autonomi testnet with optional EVM support. This action handles all prerequisites, downloads binaries, and configures the network automatically.

Features:

  • Downloads and caches Autonomi binaries
  • Builds EVM testnet from source if needed
  • Configurable node count and network settings
  • Automatic peer discovery and network verification
  • Support for custom rewards addresses
  • Automatically extracts and sets SECRET_KEY for ant CLI operations

Usage:

- name: Start Autonomi Networkuses: maidsafe/autonomi-actions/spawn-autonomi-network@v1with:
autonomi-version: 'stable-2025.7.1.3'node-count: '25'enable-evm: 'true'rewards-address: '0x03B770D9cD32077cC0bF330c13C114a87643B124'

Inputs:

InputDescriptionDefaultRequired
autonomi-versionAutonomi version to usestable-2025.7.1.3No
node-countNumber of nodes to start25No
rewards-addressEVM address for rewards0x03B770D9cD32077cC0bF330c13C114a87643B124No
enable-evmStart EVM testnet alongside networktrueNo
wait-for-networkTime to wait for network start (seconds)15No

Outputs:

OutputDescription
peer-addressFirst peer address from the started network
network-statusStatus of the network startup (running/failed)

🧹 cleanup-autonomi-network

Stops Autonomi network processes and cleans up resources. Always use this action to ensure proper cleanup of network resources.

Features:

  • Graceful network shutdown
  • Process cleanup with fallback mechanisms
  • Optional log collection and upload
  • Configurable directory preservation
  • Comprehensive cleanup verification

Usage:

- name: Cleanup Autonomi Networkif: always()uses: maidsafe/autonomi-actions/cleanup-autonomi-network@v1with:
upload-logs: 'true'keep-directories: 'true'

Inputs:

InputDescriptionDefaultRequired
upload-logsUpload logs as artifactsfalseNo
keep-directoriesKeep network directories after cleanuptrueNo
timeout-minutesMaximum cleanup time5No

Outputs:

OutputDescription
cleanup-statusStatus of cleanup (success/partial)

Complete Example

Here's a complete workflow that demonstrates both actions:

name: Test with Autonomi Networkon:
push:
branches: [ main ]pull_request:
branches: [ main ]jobs:
test-with-autonomi:
runs-on: ubuntu-latesttimeout-minutes: 60steps:
- name: Checkout codeuses: actions/checkout@v4
- name: Start Autonomi Networkuses: maidsafe/autonomi-actions/spawn-autonomi-network@v1with:
autonomi-version: 'stable-2025.7.1.3'node-count: '25'enable-evm: 'true'
- name: Run your testsrun: | # Your test commands here using ant CLI # Use --local flag to connect to the local network automatically # Example: Upload a file echo "Test data" > test.txt ant --local file upload test.txt --public # The network peer address is also available as: ${{ steps.start-network.outputs.peer-address }} echo "Network is running, peer: ${{ steps.start-network.outputs.peer-address }}" - name: Cleanup Autonomi Networkif: always()uses: maidsafe/autonomi-actions/cleanup-autonomi-network@v1with:
upload-logs: 'true'keep-directories: 'false'

Environment Variables

The actions set up several environment variables that your tests can use:

  • ANT_PEERS: The peer address of the first node in the network
  • SECRET_KEY: The deployer secret key for ant CLI payment operations (when EVM is enabled)
  • EVM_NETWORK: Set to local when EVM is enabled
  • ANT_LOG: Set to v for verbose logging

Note: When using the ant CLI with these actions, you can use the --local flag which automatically connects to the local network setup.

Requirements

  • OS: Ubuntu (latest versions recommended)
  • Runner: These actions install system dependencies and require sudo access
  • Rust: The spawn action installs the Rust toolchain automatically
  • Foundry: Installed automatically when EVM support is enabled

Advanced Usage

Custom Binary Versions

- uses: maidsafe/autonomi-actions/spawn-autonomi-network@v1with:
autonomi-version: 'stable-2025.7.2.0'# Use a specific versionnode-count: '50'# Larger network

Minimal Network (No EVM)

- uses: maidsafe/autonomi-actions/spawn-autonomi-network@v1with:
enable-evm: 'false'node-count: '10'

Debug with Log Upload

- uses: maidsafe/autonomi-actions/cleanup-autonomi-network@v1if: always()with:
upload-logs: 'true'keep-directories: 'true'# Preserve for debugging

Troubleshooting

Network Startup Issues

  1. Check the action logs for specific error messages
  2. Verify the Autonomi version exists in the releases
  3. Ensure sufficient resources (CPU/memory) for the node count

Cleanup Issues

  1. The cleanup action reports partial status when some processes couldn't be stopped gracefully
  2. Enable log upload to diagnose issues: upload-logs: 'true'
  3. Check artifact uploads for detailed cleanup logs

Binary Download Failures

  1. Verify the autonomi-version parameter matches a valid GitHub release
  2. Check network connectivity in the runner environment
  3. The action supports both stable-X.X.X and X.X.X version formats

Contributing

This repository contains reusable GitHub Actions for the Autonomi ecosystem. When contributing:

  1. Test changes thoroughly with different configurations
  2. Update documentation for any new features or parameters
  3. Follow semantic versioning for releases
  4. Ensure backward compatibility when possible

License

These actions are provided under the same license as the Autonomi project.

About

Useful github actions for Autonomi

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors