update the tests for use with wasmer #34
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 | |
# Verify Wasmer runs | |
- name: Verify Wasmer runs | |
run: | | |
wasmer config set registry.url "https://registry.wasmer.io" | |
wasmer run robert/[email protected] -- "${{ 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 | |
# 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: | | |
wasmer config set registry.url "https://registry.wasmer.io" | |
wasmer run robert/[email protected] -- "${{ env.ECHO_STRING }}" > output.txt | |
grep "${{ env.ECHO_STRING }}" output.txt |