-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: add integration test to GitHub Action #24
Changes from 2 commits
a14b27b
7412116
0ff4c16
8c72f7c
a7a892c
a2dd60e
f87dc02
9ec5ef4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,18 @@ | ||
name: Lint and Test | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
all: | ||
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 | ||
uses: actions/checkout@v4 | ||
- name: Use Node.js 18 | ||
uses: actions/setup-node@v4 | ||
with: | ||
# use node 18.8.x until Agoric/agoric-sdk#8636 | ||
node-version: '18.8.x' | ||
node-version: "18" | ||
- name: yarn install | ||
run: yarn | ||
- name: yarn lint | ||
|
@@ -24,3 +23,40 @@ jobs: | |
run: yarn test | ||
- name: yarn test:e2e | ||
run: yarn test:e2e | ||
integration: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
- name: Use Node.js 18 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "18" | ||
- name: yarn install | ||
run: yarn | ||
- name: yarn start:docker | ||
run: yarn start:docker | ||
- name: yarn build | ||
run: yarn build | ||
# Borrowed from https://github.com/DCFoundation/cosmos-proposal-builder/blob/main/.github/workflows/pr.yml#L43-L61 | ||
- 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: yarn start:contract | ||
run: yarn start:contract | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here's hoping we can test that the contracts actually got started. One way is:
but that presumes the
I'm working on running the tests for contract functionality in an end-to-end context too. But we're not quite there yet. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We do now! Jim's slides this morning gave me an idea and we're testing that. Though I don't know why the CI couldn't see Ref: https://github.com/Agoric/dapp-agoric-basics/actions/runs/8332287701/job/22801091735?pr=24 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
nice!
very strange. it's certainly in the ci log: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It could grep I tried to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oic. I was reading too quickly. I'm not sure what's up with swaparoo there. But the way it's deployed changes significantly with the addition of governance (#21) so I'm not inclined to worry about it now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a bit of a hack to make sure all of the (replay?) is complete before submitting new tx's. This number might be a bit higher now with the addition of more proposals to a3p. I'm not sure of a good way to make this more dynamic, or if a different solution could be sourced from a3p.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I think so, filed Agoric/agoric-3-proposals#130