Skip to content

Update readme to show the correct usage (#11) #49

Update readme to show the correct usage (#11)

Update readme to show the correct usage (#11) #49

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
# Verify Wasmer runs
- name: Verify Wasmer runs
run: |
wasmer run https://wasmer.io/robert/[email protected] -- "${{ env.ECHO_STRING }}" > output.txt
grep "${{ env.ECHO_STRING }}" output.txt
test-versions:
name: Test v${{ matrix.version }} on ${{ matrix.os }}
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
version:
- 3.2.0
- 3.3.0
- 4.0.0
- 4.1.0
- 4.2.0
- 4.2.5
runs-on: ${{ matrix.os }}
steps:
# Checkout source code
- name: Checkout source code
uses: actions/checkout@v3
# Setup Wasmer
- name: Setup Wasmer
uses: ./
with:
version: v${{ matrix.version }}
- name: Verify Wasmer is installed
shell: pwsh
run: |
Get-Command wasmer
# Verify Wasmer version is correct
- name: Verify Wasmer version is correct
uses: MeilCli/[email protected]
with:
command: wasmer --version
expect_contain: ${{ matrix.version }}
# Verify Wasmer runs
- name: Verify Wasmer runs
run: |
wasmer run robert/[email protected] -- "${{ env.ECHO_STRING }}" > output.txt
grep "${{ env.ECHO_STRING }}" output.txt