diff --git a/.github/workflows/test-client.yml b/.github/workflows/test-client.yml index 6373bc8801a..803bdb31ab0 100644 --- a/.github/workflows/test-client.yml +++ b/.github/workflows/test-client.yml @@ -159,3 +159,61 @@ 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: ./ + 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: + tar -xvzf pkg/*.tgz -C pkg/ && mv pkg/package/* 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: Build Explorer + working-directory: mithril-client-wasm + run: make www-test-serve \ No newline at end of file