feat(openai): allow custom base URL via OPENAI_BASE_URL; add OpenRout… #75
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: CI | |
| on: | |
| push: | |
| branches: [ "main", "dev" ] | |
| pull_request: | |
| branches: [ "main", "dev" ] | |
| jobs: | |
| lint-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| - uses: bufbuild/buf-setup-action@v1 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Install protoc-gen-doc | |
| run: | | |
| go install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc@v1.5.1 | |
| echo "$(go env GOPATH)/bin" >> $GITHUB_PATH | |
| - name: Generate protobuf code | |
| run: make proto | |
| - name: Check for breaking changes in protobuf | |
| run: buf breaking --against '.git#branch=main' | |
| continue-on-error: true # Temporarily allow failure | |
| - name: Download and verify modules (all, incl. test deps) | |
| run: | | |
| go mod download all | |
| go mod verify | |
| # ensure test deps are resolved and checksummed | |
| go list -deps -test ./... > /dev/null | |
| - name: Sync vendor directory | |
| run: go mod vendor | |
| - name: Run go vet | |
| run: go vet ./... | |
| - name: Install golangci-lint | |
| run: | | |
| curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.61.0 | |
| echo "$(go env GOPATH)/bin" >> $GITHUB_PATH | |
| - name: Clean Go Cache | |
| run: go clean -modcache | |
| - name: Lint Go files | |
| run: make lint | |
| - name: Run tests | |
| run: make test | |
| e2e-test-sqlite: | |
| runs-on: ubuntu-latest | |
| needs: lint-test | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| - name: Download and verify modules (all, incl. test deps) | |
| run: | | |
| go mod download all | |
| go mod verify | |
| go list -deps -test ./... > /dev/null | |
| - name: Sync vendor directory | |
| run: go mod vendor | |
| - name: Build binaries | |
| run: make build | |
| - name: Install SQLite | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y sqlite3 | |
| - name: Run Quick Start validation (SQLite mode) | |
| run: | | |
| chmod +x ./scripts/validate_quickstart.sh | |
| bash ./scripts/validate_quickstart.sh --mode sqlite | |
| env: | |
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY || 'dummy-key-for-testing' }} | |
| PCAS_RAG_ENABLED: "true" | |
| e2e-test-docker: | |
| runs-on: ubuntu-latest | |
| needs: lint-test | |
| # Only run Docker tests on main branch or when explicitly requested | |
| if: github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'test-docker') | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| - name: Download and verify modules (all, incl. test deps) | |
| run: | | |
| go mod download all | |
| go mod verify | |
| go list -deps -test ./... > /dev/null | |
| - name: Sync vendor directory | |
| run: go mod vendor | |
| - name: Build binaries | |
| run: make build | |
| - name: Set up Docker Compose | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y docker-compose | |
| - name: Run Quick Start validation (Docker mode) | |
| run: | | |
| chmod +x ./scripts/validate_quickstart.sh | |
| bash ./scripts/validate_quickstart.sh --mode docker | |
| env: | |
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY || 'dummy-key-for-testing' }} |