-
Notifications
You must be signed in to change notification settings - Fork 25
44 lines (35 loc) · 990 Bytes
/
go-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: go tests
on:
push:
tags:
- v*
branches:
- master
- main
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: wasm32-unknown-unknown
- name: Set up TinyGo
run: | # Installing via curl so commands are similar on OS/x
tinygo_version=0.25.0
curl -sSL https://github.com/tinygo-org/tinygo/releases/download/v${tinygo_version}/tinygo${tinygo_version}.linux-amd64.tar.gz | sudo tar -C /usr/local -xzf -
echo "TINYGOROOT=/usr/local/tinygo" >> $GITHUB_ENV
echo "/usr/local/tinygo/bin" >> $GITHUB_PATH
- name: Build Wasm
run: make build-wasm
- name: Test
run: go test -v ./...
- name: Run Example
run: go run example/main.go waPC!