Skip to content

Run tests

Run tests #26

Workflow file for this run

name: tests
run-name: Run tests
on:
push:
branches:
- master
jobs:
tests:
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- 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: Make gradlew executable
run: chmod +x ./gradlew
- name: Generate GraphQL Client
run: ./gradlew graphqlGenerateClient
shell: bash
- name: Run tests
run: ./gradlew test
- name: Stop Aptos Local Testnet
run: kill $(cat aptos_pid.txt)