Skip to content

Add retry when fetching the shell script #33

Add retry when fetching the shell script

Add retry when fetching the shell script #33

Workflow file for this run

# Test the action
name: Tests
on:
# Run tests when pushed
push:
env:
# The string echoed back by Wasmer
ECHO_STRING: Hello from WASM!
jobs:
test:
name: Test on ${{ matrix.os }}
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
# Checkout source code
- name: Checkout source code
uses: actions/checkout@v3
# Setup Wasmer
- name: Setup Wasmer
uses: ./
# Verify Wasmer is installed
- name: Verify Wasmer is installed
shell: pwsh
run: |
Get-Command wasmer
Get-Command wapm
Get-Command wax
# Verify Wasmer runs
- name: Verify Wasmer runs
run: |
wapm config set registry.url "https://registry.wapm.io"
mkdir test-dir
cd test-dir
wapm install robert/[email protected]
wasmer run -- './wapm_packages/robert/[email protected]/echo.wasm' "${{ env.ECHO_STRING }}" > output.txt
grep "${{ env.ECHO_STRING }}" output.txt
test-versions:
name: Test version on ${{ matrix.os }}
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
# Checkout source code
- name: Checkout source code
uses: actions/checkout@v3
# Setup Wasmer
- name: Setup Wasmer
uses: ./
with:
version: "v3.0.0-rc.2"
# Verify Wasmer is installed
- name: Verify Wasmer is installed
shell: pwsh
run: |
Get-Command wasmer
Get-Command wapm
Get-Command wax
# Verify Wasmer version is correct
- name: Verify Wasmer version is correct
uses: MeilCli/[email protected]
with:
command: wasmer --version
expect_contain: "wasmer 3.0.0-rc.2"
# Verify Wasmer runs
- name: Verify Wasmer runs
run: |
wapm config set registry.url "https://registry.wapm.io"
mkdir test-dir
cd test-dir
wapm install robert/[email protected]
wasmer run -- './wapm_packages/robert/[email protected]/echo.wasm' "${{ env.ECHO_STRING }}" > output.txt
grep "${{ env.ECHO_STRING }}" output.txt