-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into CedarMist/feature/clients-py
- Loading branch information
Showing
11 changed files
with
48 additions
and
53 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/sh | ||
set -o pipefail | ||
SECONDS=0 | ||
TIMEOUT=30 | ||
OASIS_WEB3_GATEWAY=http://127.0.0.1:8545 | ||
|
||
gatewayisready() { | ||
curl -X POST -s \ | ||
-H 'Content-Type: application/json' \ | ||
--data '{"jsonrpc":"2.0","method":"oasis_callDataPublicKey","params":[],"id":1}' \ | ||
${OASIS_WEB3_GATEWAY} 2>&1 | jq -e '.result | has("key")' | ||
} | ||
|
||
until gatewayisready | ||
do | ||
if (( SECONDS >= TIMEOUT )) | ||
then | ||
echo "Gateway not ready..." | ||
exit 1 | ||
fi | ||
sleep 1 | ||
done |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ on: | |
branches: | ||
- main | ||
jobs: | ||
hardhat-test: | ||
contracts-test: | ||
runs-on: ubuntu-latest | ||
services: | ||
sapphire-dev-ci: | ||
|
@@ -22,19 +22,19 @@ jobs: | |
--health-cmd="/oasis-node debug control wait-ready -a unix:/serverdir/node/net-runner/network/client-0/internal.sock" | ||
--health-start-period=90s | ||
steps: | ||
- name: attempt to connect to sapphire-dev-ci | ||
run: curl -kv http://sapphire-dev-ci:8545/ || true | ||
- name: attempt to connect to sapphire-dev-ci via localhost | ||
run: curl -kv http://127.0.0.1:8545/ || true | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Install jq | ||
run: sudo apt install -y jq | ||
- name: Wait for gateway | ||
run: bash .github/wait-until-ready.sh | ||
- name: Python client tests | ||
working-directory: clients/py | ||
run: | | ||
python3 -mpip install --user -r requirements.txt | ||
python3 -munittest discover | ||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
- uses: pnpm/[email protected] | ||
|
@@ -64,7 +64,7 @@ jobs: | |
- name: Build hardhat integration | ||
working-directory: integrations/hardhat | ||
run: pnpm build | ||
- name: hardhat test contracts | ||
- name: Test contracts with Hardhat | ||
working-directory: contracts | ||
run: pnpm hardhat test --network sapphire-dev-ci | ||
- name: Build docs | ||
|
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
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
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
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
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
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