build(deps): bump actions/setup-go from 5.0.2 to 5.1.0 #209
Workflow file for this run
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
name: Go | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
# Vet Go code | |
vet-go: | |
name: Vet Go code | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4.2.0 | |
with: | |
submodules: recursive | |
- name: Set up Go | |
uses: actions/setup-go@v5.1.0 | |
with: | |
go-version-file: go.mod | |
check-latest: true | |
- name: Vet Go code | |
run: go vet ./... | |
# Test with Go | |
test-go: | |
name: Test with Go | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
strategy: | |
matrix: | |
go-version: ["stable"] | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4.2.0 | |
with: | |
submodules: recursive | |
- name: Set up Go | |
uses: actions/setup-go@v5.1.0 | |
with: | |
go-version: ${{ matrix.go-version }} | |
check-latest: true | |
- name: Run Go tests | |
run: go test -v -bench . ./... | |
- name: Run Go tests with race detector | |
run: go test -v -race ./... | |
- name: Test Go without cgo | |
env: | |
CGO_ENABLED: 0 | |
run: go test -v ./... | |
- name: Verify repo is unchanged | |
run: git diff --exit-code HEAD | |
# Test with TinyGo | |
test-tinygo: | |
name: Test with TinyGo | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
strategy: | |
matrix: | |
version: ["0.31.2"] | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4.2.0 | |
with: | |
submodules: recursive | |
- name: Set up Go | |
uses: actions/setup-go@v5.1.0 | |
with: | |
go-version: ^1 | |
check-latest: true | |
- name: Set up TinyGo | |
uses: acifani/setup-tinygo@v2.0.0 | |
with: | |
tinygo-version: ${{ matrix.version }} | |
- name: Test with TinyGo | |
run: tinygo test -v -bench . ./... | |
- name: Verify repo is unchanged | |
run: git diff --exit-code HEAD | |
# Test with WebAssembly | |
test-wasm: | |
name: Test with WebAssembly | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
strategy: | |
matrix: | |
go-version: ["stable"] # WASI Preview 1 only available in Go 1.21 or later | |
tinygo-version: ["0.31.2"] | |
wasmtime-version: ["latest"] | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4.2.0 | |
with: | |
submodules: recursive | |
- name: Set up Go | |
uses: actions/setup-go@v5.1.0 | |
with: | |
go-version: ${{ matrix.go-version }} | |
check-latest: true | |
- name: Set up TinyGo | |
uses: acifani/setup-tinygo@v2.0.0 | |
with: | |
tinygo-version: ${{ matrix.tinygo-version }} | |
- name: Set up Wasmtime | |
uses: bytecodealliance/actions/wasmtime/setup@v1.1.0 | |
with: | |
version: ${{ matrix.wasmtime-version }} | |
- name: Add Go wasm exec to $PATH | |
run: echo "$(go env GOROOT)/misc/wasm" >> $GITHUB_PATH | |
- name: Test WebAssembly with Go + Wasmtime | |
env: | |
GOOS: wasip1 | |
GOARCH: wasm | |
run: go test -v ./... | |
- name: Test WebAssembly with TinyGo + Wasmtime | |
env: | |
GOOS: wasip1 | |
GOARCH: wasm | |
run: tinygo test -v ./... | |
- name: Verify repo is unchanged | |
run: git diff --exit-code HEAD |