Add retry when fetching the shell script #33
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
# 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 |