Skip to content

Commit

Permalink
feat: [WIP] add test-mithril-client-wasm job
Browse files Browse the repository at this point in the history
  • Loading branch information
dlachaume committed Jan 26, 2024
1 parent 4cb5f53 commit c24c6b7
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/test-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,3 +159,66 @@ jobs:
- name: Mithril Stake Distribution / download & restore latest
shell: bash
run: ${{ steps.command.outputs.mithril_client }} ${{ steps.prepare.outputs.debug_level }} mithril-stake-distribution download $MITHRIL_STAKE_DISTRIBUTION_HASH --download-dir /app

test-mithril-client-wasm:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-22.04, macos-12, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout sources
uses: actions/checkout@v3

- name: Prepare environment variables
id: prepare
shell: bash
run: |
if [[ -n "${{ inputs.commit_sha }}" ]]; then
echo "sha=${{ inputs.commit_sha }}" >> $GITHUB_OUTPUT
else
echo "branch=main" >> $GITHUB_OUTPUT
fi
if [[ "${{ inputs.enable_debug }}" == "true" ]]; then
echo "debug_level=-vvv" >> $GITHUB_OUTPUT
fi
echo "NETWORK=${{ inputs.network }}" >> $GITHUB_ENV
echo "AGGREGATOR_ENDPOINT=${{ inputs.aggregator_endpoint }}" >> $GITHUB_ENV
echo "GENESIS_VERIFICATION_KEY=$(curl -s ${{ inputs.genesis_verification_key }})" >> $GITHUB_ENV
- name: Download built artifacts
uses: dawidd6/action-download-artifact@v2
with:
name: mithril-distribution-wasm
path: ./mithril-client-wasm
commit: ${{ steps.prepare.outputs.sha }}
branch: ${{ steps.prepare.outputs.branch }}
workflow: ci.yml
workflow_conclusion: success

- name: Unpack 'mithril-client-wasm' package
working-directory: mithril-client-wasm
run: |
ls -alh
ls -alh pkg/
tar -xvzf pkg/*.tgz -C pkg/ && mv pkg/package/* pkg/
ls -alh pkg/
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
cache-dependency-path: mithril-client-wasm/www-ci/package-lock.lock

- name: Install dependencies
working-directory: mithril-client-wasm
run: make www-test-install

- name: Create .env file
working-directory: mithril-client-wasm
run: |
echo "AGGREGATOR_ENDPOINT=${{ inputs.aggregator_endpoint }}" > ./www-test.env
echo "GENESIS_VERIFICATION_KEY=$(curl -s ${{ inputs.genesis_verification_key }})" >> ./www-test.env

0 comments on commit c24c6b7

Please sign in to comment.