File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Go Pipeline
2+
3+ on :
4+ push :
5+ branches : ["main"]
6+ tags : ["v*"]
7+ pull_request :
8+ branches : ["main"]
9+
10+ jobs :
11+ tests :
12+ runs-on : ubuntu-latest
13+ steps :
14+ - name : Checkout Code
15+ uses : actions/checkout@v4
16+
17+ - name : Set up Go
18+ uses : actions/setup-go@v5
19+ with :
20+ go-version : " 1.25.5"
21+ cache : true
22+
23+ # standard go tests
24+ - name : Run Standard Tests
25+ run : go test -v ./...
26+
27+ # wasm tests
28+ - name : Install wasmbrowsertest
29+ run : |
30+ go install github.com/agnivade/wasmbrowsertest@latest
31+ # Rename for automatic discovery as per your guide
32+ mv "$(go env GOPATH)/bin/wasmbrowsertest" "$(go env GOPATH)/bin/go_js_wasm_exec"
33+
34+ - name : Run WASM Tests
35+ # ensure Chrome/Chromium is available (included in ubuntu-latest)
36+ run : GOOS=js GOARCH=wasm go test -v ./...
37+
38+ build-and-release :
39+ needs : security-and-test # only release if security AND all tests pass
40+ if : startsWith(github.ref, 'refs/tags/') # only with tag push (vX.X.X)
41+ runs-on : ubuntu-latest
42+ permissions :
43+ contents : write
44+ steps :
45+ - name : Checkout Code
46+ uses : actions/checkout@v4
47+
48+ - name : Set up Go
49+ uses : actions/setup-go@v5
50+ with :
51+ go-version : " 1.25.5"
52+ cache : true
53+
54+ - name : Build
55+ run : make build_web # just web for now
56+
57+ - name : Release
58+ uses : softprops/action-gh-release@v2
59+ with :
60+ files : build/web/core.wasm
61+ env :
62+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments