Skip to content

feat: golang version sdk #4

feat: golang version sdk

feat: golang version sdk #4

Workflow file for this run

on:
push:
branches: ['main']
pull_request:
path:
- "go/**"
workflow_dispatch:
name: Go CI
defaults:
run:
shell: bash
jobs:
build:
name: Unit tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- 'ubuntu-latest'
- 'macos-latest'
- 'windows-latest'
go-version: [ '1.19', '1.20', '1.21.x' ]
python-version: [ '3.11' ]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Poetry
run: |
pipx install poetry
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
poetry lock
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{matrix.python-version}}
cache: "poetry"
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
cache-dependency-path: go/qianfan/go.mod
- name: Display version
run: |
go version
python --version
poetry --version
- name: Install deps
run: |
make install
- name: Run test
run: |
make mock
make -C go test
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
working-directory: go/qianfan