Skip to content

feat: add runnable examples for search and chat streaming #1795

feat: add runnable examples for search and chat streaming

feat: add runnable examples for search and chat streaming #1795

Workflow file for this run

name: Tests
on:
pull_request:
merge_group:
push:
branches:
- main
jobs:
linter:
name: linter
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v5
with:
go-version: 1.24
- uses: actions/checkout@v5
- name: golangci-lint
uses: golangci/golangci-lint-action@v8
with:
version: v2.3.0
- name: Run go vet
run: go vet
- name: Yaml linter
uses: ibiqlik/action-yamllint@v3
with:
config_file: .yamllint.yml
integration_tests:
runs-on: ubuntu-latest
# Will not run if the event is a PR to bump-meilisearch-v* (so a pre-release PR)
# Will still run for each push to bump-meilisearch-v*
if: github.event_name != 'pull_request' || !startsWith(github.base_ref, 'bump-meilisearch-v')
strategy:
matrix:
# Current go.mod version and latest stable go version
go: ["1.20", "1.24"]
include:
- go: "1.20"
tag: current
- go: "1.24"
tag: latest
name: integration-tests (go ${{ matrix.tag }} version)
steps:
- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Check out code into the Go module directory
uses: actions/checkout@v5
- name: Get dependencies
run: go mod download
- name: Meilisearch setup (latest version) with Docker
run: docker run -d -p 7700:7700 getmeili/meilisearch:latest meilisearch --master-key=masterKey --no-analytics
- name: Run unit tests
run: |
go test --race -v -gcflags=-l -coverprofile=unit_coverage.txt -covermode=atomic $(go list ./... | grep -v /integration)
- name: Run integration tests
run: |
go test --race -v -gcflags=-l -coverprofile=integration_coverage.txt -covermode=atomic -coverpkg=./... ./integration
- name: Merge coverage reports
run: |
go install github.com/ja7ad/gocovmerge/cmd/gocovmerge@v0.2.0
gocovmerge unit_coverage.txt integration_coverage.txt > coverage.txt
- name: Upload coverage report
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}