community spend proposal #51 #93
Workflow file for this run
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
name: Lint and Test | |
on: | |
pull_request: | |
jobs: | |
unit: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
- name: Use Node.js 18.8.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.8.x' | |
- name: yarn install | |
run: yarn install | |
- name: yarn build | |
run: yarn build | |
- name: yarn lint | |
run: yarn lint | |
- name: yarn ts:check | |
run: yarn ts:check | |
- name: yarn test:unit | |
run: yarn test:unit | |
e2e: | |
runs-on: ubuntu-latest | |
services: | |
agoric: | |
image: ghcr.io/agoric/agoric-3-proposals:main # simulation of agoric-3 | |
ports: | |
- 1317:1317 # api port | |
- 26657:26657 # rpc port | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
- name: Use Node.js 18.8.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.8.x' | |
- name: yarn install | |
run: yarn install | |
- name: Wait for Docker container to be ready | |
run: | | |
timeout 180 bash -c ' | |
TARGET_HEIGHT=1001 | |
SLEEP=10 | |
echo "Waiting for the Agoric service to be fully ready..." | |
echo "Target block height: $TARGET_HEIGHT" | |
while true; do | |
response=$(curl --silent http://localhost:26657/abci_info); | |
height=$(echo $response | jq -r ".result.response.last_block_height | tonumber"); | |
if [ "$height" -ge $TARGET_HEIGHT ]; then | |
echo "Service is ready! Last block height: $height"; | |
break; | |
else | |
echo "Waiting for last block height to reach $TARGET_HEIGHT. Current height: $height"; | |
fi; | |
sleep $SLEEP; | |
done | |
' | |
- name: Run E2E Tests | |
run: yarn test:e2e |