feat(MPC-2011): refactor webjs to viem #18
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: Run Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
env: | |
BUILDERVAULT_PLAYER_COUNT: 2 | |
BUILDERVAULT_PLAYER0_URL: "http://localhost:8500" | |
BUILDERVAULT_PLAYER0_APIKEY: "apikey0" | |
BUILDERVAULT_PLAYER1_URL: "http://localhost:8501" | |
BUILDERVAULT_PLAYER1_APIKEY: "apikey1" | |
BUILDERVAULT_ACCOUNT_ID: 0 | |
BUILDERVAULT_ADDRESS_INDEX: 0 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '22' | |
- name: Download BuilderVault TSM Demo repo | |
env: | |
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }} | |
run: git clone "https://:${{ secrets.GITLAB_TOKEN }}@gitlab.com/Blockdaemon/tsm-demo.git" tsm-demo | |
- name: Log into Nexus registry | |
env: | |
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }} | |
NEXUS_TOKEN: ${{ secrets.NEXUS_TOKEN }} | |
run: echo "${{ secrets.NEXUS_TOKEN }}" | docker login nexus.sepior.net:19001 -u "${{ secrets.NEXUS_USERNAME }}" --password-stdin | |
- name: Run BuilderVault TSM Demo | |
working-directory: ./tsm-demo/tsm | |
run: docker compose up --quiet-pull -d | |
- name: Generate BuilderVault MasterKey | |
working-directory: ./tsm-demo/sdk/nodejs/ | |
run: | | |
npm config set @sepior:registry=https://gitlab.com/api/v4/projects/56306653/packages/npm/ | |
npm install @sepior/tsmsdkv2 ethers asn1.js node-fs | |
npx ts-node crypto_ethereum.js | |
echo BUILDERVAULT_MASTERKEY_ID=$(cat key.txt) >> "$GITHUB_ENV" | |
- name: Install Foundry Tools | |
uses: foundry-rs/foundry-toolchain@v1 | |
- name: Run Foundry Anvil | |
run: | | |
pwd | |
anvil & | |
- name: Install Buildervault Web3 Provider dependencies | |
run: npm install | |
- name: Run Buildervault Web3 Provider tests | |
run: npm test |