Skip to content

feat: add go sdk for code interpreter #330

feat: add go sdk for code interpreter

feat: add go sdk for code interpreter #330

Workflow file for this run

name: Lint
on:
pull_request:
permissions:
contents: read
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Parse .tool-versions
uses: wistia/parse-tool-versions@v2.1.1
with:
filename: '.tool-versions'
uppercase: 'true'
prefix: 'tool_version_'
- uses: pnpm/action-setup@v4
with:
version: 9.15.9
- name: Setup Node.js 20
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: pnpm
- name: Configure pnpm
run: |
pnpm config set auto-install-peers true
pnpm config set exclude-links-from-lockfile true
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '${{ env.TOOL_VERSION_PYTHON }}'
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
version: '${{ env.TOOL_VERSION_POETRY }}'
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Install Python dependencies
working-directory: python
run: |
poetry install --with dev
pip install ruff=="0.11.12"
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '${{ env.TOOL_VERSION_GOLANG }}'
cache-dependency-path: go/go.sum
- name: Check Go formatting
working-directory: go
run: |
if [[ -n "$(gofmt -l .)" ]]; then
echo "❌ Go files are not formatted properly:"
gofmt -d .
exit 1
else
echo "✅ Go files are properly formatted."
fi
- name: Go vet
working-directory: go
run: go vet ./...
- name: Run linting
run: |
pnpm run lint
- name: Run formatting
run: |
pnpm run format
- name: Check for uncommitted changes
run: |
if [[ -n $(git status --porcelain) ]]; then
echo "❌ Files are not formatted properly:"
git status --short
git diff
exit 1
else
echo "✅ No changes detected."
fi