Skip to content

Commit

Permalink
feat(ci): Replace manual Aptos local testnet setup with GitHub Action
Browse files Browse the repository at this point in the history
- Replaced the manual installation and execution of the Aptos local testnet with the `aptos-labs/actions/run-local-testnet` GitHub Action.
- Simplified the CI workflow by removing manual dependency installations for Aptos and related services.

This change streamlines the workflow, reduces maintenance overhead, and ensures consistency in the test environment setup.
  • Loading branch information
astinz committed Nov 15, 2024
1 parent 0698d1b commit 5315c9b
Showing 1 changed file with 5 additions and 23 deletions.
28 changes: 5 additions & 23 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,10 @@ jobs:
- name: Update brew
run: brew update

- name: Install dependencies
run: |
brew install aptos
brew install curl
- name: Start Aptos Local Testnet
run: |
aptos node run-local-testnet & echo $! > aptos_pid.txt
sleep 30 # Initial wait for services to start
# Poll the readiness endpoint until it's available
until curl -sSf http://127.0.0.1:8080/; do
echo "Waiting for Aptos Node API to be ready..."
sleep 5
done
until curl -sSf http://127.0.0.1:8081/; do
echo "Waiting for Faucet to be ready..."
sleep 5
done
shell: bash
- name: Run a local testnet in the background
uses: aptos-labs/actions/run-local-testnet@main
with:
PNPM_VERSION: 8.9.0

- name: Make gradlew executable
run: chmod +x ./gradlew
Expand All @@ -43,7 +28,4 @@ jobs:
shell: bash

- name: Run tests
run: ./gradlew test

- name: Stop Aptos Local Testnet
run: kill $(cat aptos_pid.txt)
run: ./gradlew test

0 comments on commit 5315c9b

Please sign in to comment.