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.
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:
| Input | Description | Default | Required |
|---|---|---|---|
autonomi-version | Autonomi version to use | stable-2025.7.1.3 | No |
node-count | Number of nodes to start | 25 | No |
rewards-address | EVM address for rewards | 0x03B770D9cD32077cC0bF330c13C114a87643B124 | No |
enable-evm | Start EVM testnet alongside network | true | No |
wait-for-network | Time to wait for network start (seconds) | 15 | No |
Outputs:
| Output | Description |
|---|---|
peer-address | First peer address from the started network |
network-status | Status of the network startup (running/failed) |
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:
| Input | Description | Default | Required |
|---|---|---|---|
upload-logs | Upload logs as artifacts | false | No |
keep-directories | Keep network directories after cleanup | true | No |
timeout-minutes | Maximum cleanup time | 5 | No |
Outputs:
| Output | Description |
|---|---|
cleanup-status | Status of cleanup (success/partial) |
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'The actions set up several environment variables that your tests can use:
ANT_PEERS: The peer address of the first node in the networkSECRET_KEY: The deployer secret key for ant CLI payment operations (when EVM is enabled)EVM_NETWORK: Set tolocalwhen EVM is enabledANT_LOG: Set tovfor 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.
- OS: Ubuntu (latest versions recommended)
- Runner: These actions install system dependencies and require
sudoaccess - Rust: The spawn action installs the Rust toolchain automatically
- Foundry: Installed automatically when EVM support is enabled
- uses: maidsafe/autonomi-actions/spawn-autonomi-network@v1with:
autonomi-version: 'stable-2025.7.2.0'# Use a specific versionnode-count: '50'# Larger network- uses: maidsafe/autonomi-actions/spawn-autonomi-network@v1with:
enable-evm: 'false'node-count: '10'- uses: maidsafe/autonomi-actions/cleanup-autonomi-network@v1if: always()with:
upload-logs: 'true'keep-directories: 'true'# Preserve for debugging- Check the action logs for specific error messages
- Verify the Autonomi version exists in the releases
- Ensure sufficient resources (CPU/memory) for the node count
- The cleanup action reports
partialstatus when some processes couldn't be stopped gracefully - Enable log upload to diagnose issues:
upload-logs: 'true' - Check artifact uploads for detailed cleanup logs
- Verify the
autonomi-versionparameter matches a valid GitHub release - Check network connectivity in the runner environment
- The action supports both
stable-X.X.XandX.X.Xversion formats
This repository contains reusable GitHub Actions for the Autonomi ecosystem. When contributing:
- Test changes thoroughly with different configurations
- Update documentation for any new features or parameters
- Follow semantic versioning for releases
- Ensure backward compatibility when possible
These actions are provided under the same license as the Autonomi project.