new sample ws chat completion and bug fix #231
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: SPEAR Build and Test | |
| on: push | |
| jobs: | |
| SPEAR-Build: | |
| name: Make & Run SPEAR Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Read warehouse contents | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # 拉取完整提交历史 | |
| fetch-tags: true # 关键:拉取所有标签 | |
| # - name: Set up Go | |
| # uses: actions/setup-go@v4 | |
| # with: | |
| # go-version: '1.23' # 请根据需要选择合适的 Go 版本 | |
| # - name: Install Flatbuffers | |
| # run: | | |
| # wget -q https://github.com/google/flatbuffers/releases/download/v24.12.23/Linux.flatc.binary.clang++-18.zip | |
| # unzip Linux.flatc.binary.clang++-18.zip | |
| # sudo cp flatc /usr/local/bin | |
| # rm flatc Linux.flatc.binary.clang++-18.zip | |
| # - name: Verify Go Version | |
| # run: go version | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.13' | |
| - name: Verify Python Version | |
| run: python --version | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install build | |
| - name: Install Docker | |
| uses: docker/setup-buildx-action@v2 | |
| - name: Install Dependencies & Compile Files | |
| run: | | |
| sudo apt install portaudio19-dev libx11-dev libxtst-dev | |
| # curl -fsSL https://get.docker.com -o get-docker.sh | |
| # sudo sh get-docker.sh | |
| make | |
| - name: Pull Related Docker Images | |
| run: | | |
| docker pull qdrant/qdrant:latest | |
| docker pull docker.io/library/alpine:latest | |
| - name: Run Tests | |
| env: | |
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
| OPENAI_API_BASE: ${{ secrets.OPENAI_API_BASE }} | |
| DOCKER_API_VERSION: '1.45' | |
| run: | | |
| make test | |
| # - name: Set environment variables and run test program | |
| # run: | | |
| # ip_address=$(ip addr show eth0 | grep -oP 'inet \K[\d.]+') | |
| # echo "IP Address: $ip_address" | |
| # export SPEAR_RPC_ADDR=$ip_address | |
| # echo "SPEAR_RPC_ADDR=$ip_address" >> $GITHUB_ENV | |
| # OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }} | |
| # HUGGINGFACEHUB_API_TOKEN=${{ secrets.HUGGINGFACEHUB_API_TOKEN }} | |
| # export OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }} | |
| # export HUGGINGFACEHUB_API_TOKEN=${{ secrets.HUGGINGFACEHUB_API_TOKEN }} | |
| # echo "SPEAR_RPC_ADDR=$ip_address" >> $GITHUB_ENV | |
| # echo "OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}" >> $GITHUB_ENV | |
| # echo "HUGGINGFACEHUB_API_TOKEN=${{ secrets.HUGGINGFACEHUB_API_TOKEN }}" >> $GITHUB_ENV | |
| # go test -v ./test/simple_req_test.go |