-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add CI test that checks an SNS can be launched using dfx nns / dfx sns #131
base: main
Are you sure you want to change the base?
Conversation
.github/workflows/e2e.yml
Outdated
@@ -53,6 +53,8 @@ jobs: | |||
if: matrix.extension == 'sns' | |||
- name: run test | |||
run: timeout 2400 e2e/bats/bin/bats extensions/${{ matrix.extension }}/e2e/tests/*.bash | |||
- name: run sns tests | |||
run: timeout 2400 e2e/launch-simple-sns.sh |
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.
NCR but GitHub actions explicitly supports timeouts:
https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepstimeout-minutes
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.
Thanks for the pointer. I was following the pattern I found in the CI config file. I'll also consult with the SDK team to find out their view on how to best add this script to the CI.
dfx identity use ident-1 | ||
PRINCIPAL_ID=$(dfx identity get-principal) | ||
|
||
# Hack |
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.
Can you say more about why this hack is needed?
sleep 15s | ||
|
||
# Top-up the SNS-W canister | ||
dfx ledger fabricate-cycles --canister qaa6y-5yaaa-aaaaa-aaafa-cai --t 2345 |
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.
How about using variables for the canister IDs? Also below.
|
||
dfx canister call "rrkah-fqaaa-aaaaa-aaaaq-cai" update_neuron '( | ||
record { | ||
id = opt record { id = '${NEURON_ID}' : nat64 }; |
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.
I was super confused about why the variable expansion works with the single quotes. But then I realized you actually end the single quote string, concatenate the variable and then open a new string. Is that intentional or did it work by accident?
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 intentional, but I'm no Bash expert — maybe there's a better way.
auto_stake_maturity = opt true; | ||
aging_since_timestamp_seconds = 456 : nat64; | ||
hot_keys = vec {}; | ||
account = blob "3\8fZ\9fn\af]\a9\17\be\ea\14yA\f3\b3\00\16\af[\ae\1cq\c0\a0\dd\1d?\d8\e7\a96"; |
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.
Where does this blob come from?
cargo run --bin sns propose --neuron-id "${NEURON_ID}" sns_init.yaml | ||
|
||
# Check that the CreateServiceNervousSystem propsoal was executed | ||
PROPOSAL_DATA=$(dfx canister \ |
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.
NCR: shellcheck would require double quotes around the $()
so I guess this repo doesn't run a linter on the shell scripts?
Might be worth doing.
Idea from @anchpop , add the CI test to extensions/sns/e2e/tests |
No description provided.