Skip to content

Go Test

Go Test #1015

Workflow file for this run

name: Go Test
on:
push:
pull_request:
merge_group:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
matrix:
go:
- stable
- oldstable
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
submodules: true
- name: Set up Python
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: '3.x'
- name: Set up Go
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
with:
go-version: ${{ matrix.go }}
- name: Install goimports
run: go install golang.org/x/tools/cmd/goimports@latest
- name: Generate code
run: python generate-code.py
- name: run test.sh
run: bash script/test.sh
- name: go vet
run: go vet $(go list ./... | grep -v /examples/)
- name: Compile example scripts
run: |
for file in $(find ./examples/ -name '*.go'); do
dir=$(dirname $file)
pushd $dir
go build -o /dev/null
popd
done
pinact:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Run pinact
uses: suzuki-shunsuke/pinact-action@3d49c6412901042473ffa78becddab1aea46bbea # v1.3.1
with:
skip_push: "true"