Remove unused isDatabaseOpen method from Manager struct to streamline code and improve maintainability. #26
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: PR Build | |
| on: | |
| pull_request: | |
| branches: [main, develop] | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| go-version: ["1.22", "1.23.10"] | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| GO111MODULE: "on" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| - name: Cache Go modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cache/go-build | |
| ~/go/pkg/mod | |
| ~/AppData/Local/go-build | |
| key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go-${{ matrix.go-version }}- | |
| - name: Download dependencies | |
| run: go mod download | |
| - name: Run tests (with nogui for CI) | |
| run: go test -tags nogui -v ./... | |
| - name: Build binary for Linux | |
| if: runner.os == 'Linux' | |
| shell: bash | |
| run: | | |
| VERSION=pr-${{ github.event.number }}-${{ github.sha }} | |
| CGO_ENABLED=0 go build -ldflags "-X main.version=${VERSION}" -o mcpproxy ./cmd/mcpproxy | |
| - name: Build binary for macOS | |
| if: runner.os == 'macOS' | |
| shell: bash | |
| run: | | |
| VERSION=pr-${{ github.event.number }}-${{ github.sha }} | |
| go build -ldflags "-X main.version=${VERSION}" -o mcpproxy ./cmd/mcpproxy | |
| - name: Build binary for Windows | |
| if: runner.os == 'Windows' | |
| shell: bash | |
| run: | | |
| VERSION=pr-${{ github.event.number }}-${{ github.sha }} | |
| CGO_ENABLED=0 go build -ldflags "-X main.version=${VERSION}" -o mcpproxy.exe ./cmd/mcpproxy | |
| - name: Test version output | |
| shell: bash | |
| run: | | |
| if [[ "${{ runner.os }}" == "Windows" ]]; then | |
| ./mcpproxy.exe --version | |
| else | |
| ./mcpproxy --version | |
| fi |