Skip to content

Golang docs

Golang docs #593

Workflow file for this run

name: Test build
on:
pull_request:
branches:
- main
jobs:
test-build:
name: Test build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run vale spell and style check
continue-on-error: true
uses: errata-ai/vale-action@reviewdog
with:
files: docs
- uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Test build website
run: yarn build
# Test TypeScript code snippets
- name: Compile TypeScript code snippets
run: npm install --prefix code_snippets/ts && npm run build --prefix code_snippets/ts
- name: Check if TypeScript code snippets build is successful
run: |
if [ -d "code_snippets/ts/dist" ]; then
echo "TypeScript compilation successful"
else
echo "TypeScript compilation failed"
exit 1
fi
# Setup Java
- uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: "21"
# Check Java code snippets
- name: Test Java code snippets
uses: gradle/gradle-build-action@v2
with:
arguments: check
build-root-directory: code_snippets/java
# Check Java code snippets
- name: Test Kotlin code snippets
uses: gradle/gradle-build-action@v2
with:
arguments: check
build-root-directory: code_snippets/kotlin
# Setup Go
- uses: actions/setup-go@v5
if: github.event.inputs.sdkGoVersion != ''
with:
go-version: "1.21"
# Check Go code snippets
- name: Test Go code snippets
working-directory: code_snippets/go
run: go test ./...