Skip to content

ci: add go test runner #356

ci: add go test runner

ci: add go test runner #356

Workflow file for this run

on: [push, pull_request, workflow_dispatch]
name: CI
jobs:
go:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install Go toolchain
uses: actions/setup-go@v4
- name: Run go test
run: |
cd go
go test ./...
rust:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
- name: Run basic example
uses: actions-rs/cargo@v1
with:
command: run
args: --example=basic test/test.c.instr.wasm "Test"
- name: Run many example
uses: actions-rs/cargo@v1
with:
command: run
args: --example=many test/test.c.instr.wasm "Test"
- name: Run OpenTelemetry STDOUT example
run: |
cargo run --example=otel-stdout test/nested.c.instr.wasm > test.json
cat test.json \
| head -n 1 \
| jq '.resourceSpans[].scopeSpans[].spans[0].attributes[0]' \
| jq '.key == "function_name", .value.stringValue == "_start"'