Skip to content

Commit

Permalink
Merge pull request #52 from algorandfoundation/feat/bootstrap-command
Browse files Browse the repository at this point in the history
feat: bootstrap command
  • Loading branch information
PhearZero authored Jan 6, 2025
2 parents c62cebb + 1d4b596 commit 485b6ec
Show file tree
Hide file tree
Showing 53 changed files with 870 additions and 953 deletions.
43 changes: 0 additions & 43 deletions .docker/Fedora.dockerfile

This file was deleted.

47 changes: 0 additions & 47 deletions .docker/Ubuntu.dockerfile

This file was deleted.

16 changes: 0 additions & 16 deletions .docker/start_all.sh

This file was deleted.

49 changes: 0 additions & 49 deletions .docker/start_dev.sh

This file was deleted.

41 changes: 0 additions & 41 deletions .docker/start_empty.sh

This file was deleted.

46 changes: 0 additions & 46 deletions .docker/start_fast_catchup.sh

This file was deleted.

29 changes: 1 addition & 28 deletions .github/workflows/code_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,6 @@ jobs:
with:
go-version: 1.22

- name: setup .algorun.yaml
run: |
touch .algorun.yaml
echo 'server: http://localhost:8080' >> .algorun.yaml
echo 'token: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' >> .algorun.yaml
- name: Start Docker Compose
run: docker compose up -d

- name: Wait for the server to start
run: npx wait-on tcp:8080

- name: Install dependencies
run: go get .

Expand Down Expand Up @@ -56,22 +44,7 @@ jobs:
run: go build -o bin/algorun *.go

- name: Unit Tests
run: make unit

- name: Kill docker
run: docker compose down

- name: Start Integration
run: docker compose -f docker-compose.integration.yaml up -d

- name: Wait for mount
run: npx wait-on ./coverage/int/fedora/40 ./coverage/int/ubuntu/24.04/

- name: Integration tests
run: make integration

- name: Combine coverage
run: make combine-coverage
run: make test

- name: Upload results to Codecov
uses: codecov/codecov-action@v4
Expand Down
50 changes: 38 additions & 12 deletions .github/workflows/node_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,28 @@ jobs:
go-version: 1.22
- name: Run Ubuntu commands
run: |
go build .
./algorun-tui node install
export GOCOVERDIR=$(pwd)/coverage
mkdir -p $GOCOVERDIR
go build -cover .
./algorun-tui 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"
./algorun-tui node stop
./algorun-tui node upgrade
./algorun-tui node stop
./algorun-tui node uninstall
./algorun-tui stop
./algorun-tui upgrade
./algorun-tui debug
sleep 10
./algorun-tui catchup
./algorun-tui catchup debug
./algorun-tui catchup stop
./algorun-tui stop
./algorun-tui 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
Expand All @@ -44,13 +57,26 @@ jobs:

- name: Run MacOs commands
run: |
go build .
./algorun-tui node install
export GOCOVERDIR=$(pwd)/coverage
mkdir -p $GOCOVERDIR
go build -cover .
./algorun-tui 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"
./algorun-tui node stop
./algorun-tui node upgrade
./algorun-tui node stop
./algorun-tui node uninstall
./algorun-tui stop
./algorun-tui upgrade
./algorun-tui debug
sleep 10
./algorun-tui catchup
./algorun-tui catchup debug
./algorun-tui catchup stop
./algorun-tui stop
./algorun-tui 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 }}
31 changes: 0 additions & 31 deletions Dockerfile

This file was deleted.

Loading

0 comments on commit 485b6ec

Please sign in to comment.