Skip to content

Commit b872daf

Browse files
committed
feat: [WIP] add test-mithril-client-wasm job
1 parent e522528 commit b872daf

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

.github/workflows/test-client.yml

+61
Original file line numberDiff line numberDiff line change
@@ -159,3 +159,64 @@ jobs:
159159
- name: Mithril Stake Distribution / download & restore latest
160160
shell: bash
161161
run: ${{ steps.command.outputs.mithril_client }} ${{ steps.prepare.outputs.debug_level }} mithril-stake-distribution download $MITHRIL_STAKE_DISTRIBUTION_HASH --download-dir /app
162+
163+
test-mithril-client-wasm:
164+
strategy:
165+
fail-fast: false
166+
matrix:
167+
os: [ ubuntu-22.04, macos-12, windows-latest ]
168+
runs-on: ${{ matrix.os }}
169+
steps:
170+
- name: Checkout sources
171+
uses: actions/checkout@v3
172+
173+
- name: Prepare environment variables
174+
id: prepare
175+
shell: bash
176+
run: |
177+
if [[ -n "${{ inputs.commit_sha }}" ]]; then
178+
echo "sha=${{ inputs.commit_sha }}" >> $GITHUB_OUTPUT
179+
else
180+
echo "branch=main" >> $GITHUB_OUTPUT
181+
fi
182+
183+
if [[ "${{ inputs.enable_debug }}" == "true" ]]; then
184+
echo "debug_level=-vvv" >> $GITHUB_OUTPUT
185+
fi
186+
187+
echo "NETWORK=${{ inputs.network }}" >> $GITHUB_ENV
188+
echo "AGGREGATOR_ENDPOINT=${{ inputs.aggregator_endpoint }}" >> $GITHUB_ENV
189+
echo "GENESIS_VERIFICATION_KEY=$(curl -s ${{ inputs.genesis_verification_key }})" >> $GITHUB_ENV
190+
191+
- name: Download built artifacts
192+
uses: dawidd6/action-download-artifact@v2
193+
with:
194+
name: mithril-distribution-wasm
195+
path: ./mithril-client-wasm
196+
commit: ${{ steps.prepare.outputs.sha }}
197+
branch: ${{ steps.prepare.outputs.branch }}
198+
workflow: ci.yml
199+
workflow_conclusion: success
200+
201+
- name: Unpack 'mithril-client-wasm' package
202+
working-directory: mithril-client-wasm
203+
run: |
204+
ls -alh
205+
ls -alh pkg/
206+
tar -xvzf pkg/*.tgz -C pkg/ && mv pkg/package/* pkg/
207+
ls -alh pkg/
208+
209+
- name: Setup Node.js
210+
uses: actions/setup-node@v3
211+
with:
212+
node-version: 18
213+
cache: 'npm'
214+
cache-dependency-path: mithril-client-wasm/www-ci/package-lock.lock
215+
216+
- name: Install dependencies
217+
working-directory: mithril-client-wasm
218+
run: make www-test-install
219+
220+
- name: Build Explorer
221+
working-directory: mithril-client-wasm
222+
run: make www-test-serve

0 commit comments

Comments
 (0)