-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'refactor/nodekit' into beta
- Loading branch information
Showing
198 changed files
with
15,454 additions
and
2,237 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
## This is a temporary flow, until we have our custom docker images that work with systemd for linux. | ||
## Once we have that, we can remove this and use docker containers in parallel, covering the various OS:es. | ||
|
||
name: Node Command OS-Matrix Test | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
paths: | ||
- "cmd/**" | ||
|
||
jobs: | ||
ubuntu: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.22 | ||
- name: Run Ubuntu commands | ||
run: | | ||
export GOCOVERDIR=$(pwd)/coverage | ||
mkdir -p $GOCOVERDIR | ||
go build -cover . | ||
./nodekit install | ||
systemctl status algorand.service | ||
export TOKEN=$(cat /var/lib/algorand/algod.admin.token) | ||
curl http://localhost:8080/v2/participation -H "X-Algo-API-Token: $TOKEN" | grep "null" | ||
./nodekit stop | ||
./nodekit upgrade | ||
./nodekit debug | ||
sleep 10 | ||
./nodekit catchup | ||
./nodekit catchup debug | ||
./nodekit catchup stop | ||
./nodekit stop | ||
./nodekit uninstall | ||
go tool covdata textfmt -i=$GOCOVERDIR -o coverage.txt | ||
- name: Upload results to Codecov | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
macos: | ||
runs-on: macos-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Go | ||
run: brew install go | ||
|
||
- name: Run MacOs commands | ||
run: | | ||
export GOCOVERDIR=$(pwd)/coverage | ||
mkdir -p $GOCOVERDIR | ||
go build -cover . | ||
./nodekit install | ||
sudo launchctl print system/com.algorand.algod | ||
sleep 5 | ||
export TOKEN=$(cat ~/.algorand/algod.admin.token) | ||
curl http://localhost:8080/v2/participation -H "X-Algo-API-Token: $TOKEN" | grep "null" | ||
./nodekit stop | ||
./nodekit upgrade | ||
./nodekit debug | ||
sleep 10 | ||
./nodekit catchup | ||
./nodekit catchup debug | ||
./nodekit catchup stop | ||
./nodekit stop | ||
./nodekit uninstall | ||
go tool covdata textfmt -i=$GOCOVERDIR -o coverage.txt | ||
- name: Upload results to Codecov | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,13 +7,13 @@ A guide on how to contribute to this project. | |
Clone the project | ||
|
||
```bash | ||
git clone [email protected]:algorandfoundation/algorun-tui.git | ||
git clone [email protected]:algorandfoundation/nodekit.git | ||
``` | ||
|
||
Change to the directory | ||
|
||
```bash | ||
cd algorun-tui | ||
cd nodekit | ||
``` | ||
|
||
Build the project | ||
|
@@ -29,7 +29,7 @@ Optionally, run a sandboxed participation node | |
docker compose up | ||
``` | ||
|
||
Create a configuration file for the participation node in the root directory of the project (.algorun.yaml) | ||
Create a configuration file for the participation node in the root directory of the project (.nodekit.yaml) | ||
|
||
```yaml | ||
algod-endpoint: http://localhost:8080 | ||
|
@@ -40,13 +40,13 @@ Launch the TUI | |
> [!NOTE] | ||
> If you skipped the docker container or config file, try running `./bin/algorun` standalone, | ||
> If you skipped the docker container or config file, try running `./bin/nodekit` standalone, | ||
> which will detect your algorand data directory from the `ALGORAND_DATA` environment variable that works for `goal`. | ||
> Otherwise, provide the `--algod-endpoint` and `--algod-token` arguments so that it can find your node. | ||
> Note that algorun requires the admin algod token. | ||
> Note that nodekit requires the admin algod token. | ||
|
||
```bash | ||
./bin/algorun | ||
./bin/nodekit | ||
``` | ||
|
||
# 📂 Folder Structure | ||
|
@@ -67,7 +67,7 @@ All submodules and endpoints **SHOULD** align with the command/ui namespaces. | |
Example Command: | ||
|
||
```bash | ||
algorun status | ||
nodekit status | ||
``` | ||
|
||
Example Structure | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
build: | ||
CGO_ENABLED=0 go build -o bin/algorun *.go | ||
CGO_ENABLED=0 go build -o bin/nodekit . | ||
test: | ||
go test -coverpkg=./... -covermode=atomic ./... | ||
go test -coverprofile=coverage.out -coverpkg=./... -covermode=atomic ./... | ||
generate: | ||
oapi-codegen -config generate.yaml https://raw.githubusercontent.com/algorand/go-algorand/v3.26.0-stable/daemon/algod/api/algod.oas3.yml |
Oops, something went wrong.