Skip to content

feat: golang version sdk #3

feat: golang version sdk

feat: golang version sdk #3

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: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{matrix.python-version}}
- name: Display version
run: |
go version
python --version
- name: Install latest version of Poetry
if: steps.cache-poetry.outputs.cache-hit != 'true'
run: |
pip install poetry
# Poetry still needs to be re-prepended to the PATH on each run, since
# PATH does not persist between runs.
- name: Add Poetry to $PATH
run: |
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
- name: Get Poetry version
run: poetry --version
- name: Install deps
if: steps.cache-deps.cache-hit != 'true'
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