45 lines
989 B
YAML
45 lines
989 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
verify:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: go.mod
|
|
cache: true
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- name: Set up protoc
|
|
uses: arduino/setup-protoc@v3
|
|
with:
|
|
version: "25.1"
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Verify generated protobuf code
|
|
run: make proto-check
|
|
|
|
- name: Go tests
|
|
run: GOCACHE=/tmp/configcenter-go-cache go test ./...
|
|
|
|
- name: Go race tests
|
|
run: GOCACHE=/tmp/configcenter-go-cache go test -race ./...
|
|
|
|
- name: Python SDK compile check
|
|
run: PYTHONPATH="$PWD/.tools/python:$PWD/sdk/python" python -m compileall -q sdk/python/configcenter
|