Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
f0bb9ab
feat(gitignore): Add .gitignore file to exclude build artifacts and e…
sgaunet Sep 20, 2025
18c131a
feat: Implement PostgreSQL client and tools for MCP integration
sgaunet Sep 20, 2025
0d3f447
feat: Add Taskfile for build, test, and linting tasks
sgaunet Sep 20, 2025
8121f45
feat: Add VSCode settings for YAML custom tags and Go linting
sgaunet Sep 20, 2025
36c40e0
feat: Add FUNDING.yml to specify GitHub funding information
sgaunet Sep 20, 2025
93aca5b
feat: add logger tests
sgaunet Sep 20, 2025
7c7930a
feat: update app logic for database connection handling
sgaunet Sep 20, 2025
8f0ba07
tests: Add comprehensive tests for application functionality and comm…
sgaunet Sep 20, 2025
ca40af8
chore: update go.mod and go.sum with additional indirect dependencies
sgaunet Sep 20, 2025
a82bc0d
feat: enhance error handling and validation in DescribeTable and Expl…
sgaunet Sep 20, 2025
3502964
doc: update README with installation instructions for project configu…
sgaunet Sep 20, 2025
a9012fa
feat: add GitHub Actions workflow for running tests with PostgreSQL s…
sgaunet Sep 20, 2025
278abd7
chore: remove health check options for PostgreSQL service in GitHub A…
sgaunet Sep 20, 2025
527153b
chore: remove PostgreSQL service configuration from GitHub Actions wo…
sgaunet Sep 20, 2025
454ee87
chore: update GitHub Actions workflow to install Go and remove unused…
sgaunet Sep 20, 2025
8e490de
feat: add GitHub Actions workflow for creating snapshot releases
sgaunet Sep 20, 2025
b7bb36d
feat: add GitHub Actions workflow for vulnerability scanning
sgaunet Sep 20, 2025
24bdd7e
feat: add GitHub Actions workflow for generating coverage badges
sgaunet Sep 20, 2025
4def0e1
feat: add tasks for creating snapshot and regular releases in Taskfile
sgaunet Sep 20, 2025
f01c112
feat: add GitHub Actions workflow for release automation
sgaunet Sep 20, 2025
a7b9bab
feat: add linter workflow and configuration files
sgaunet Sep 20, 2025
2ef0b39
feat: add initial GoReleaser configuration for project builds and rel…
sgaunet Sep 20, 2025
7fb5ce3
feat: update installation instructions in README.md for clarity and a…
sgaunet Sep 20, 2025
4e39223
chore: fix linter errors
sgaunet Sep 20, 2025
b44c115
doc: add badges for GitHub release, downloads, coverage, and license …
sgaunet Sep 20, 2025
9177f17
chore: update golangci-lint version to v2.4.0 in linter workflow
sgaunet Sep 20, 2025
673f391
chore: update golangci-lint binaries location to v2.4.0 in linter wor…
sgaunet Sep 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: [sgaunet]
49 changes: 49 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Generate coverage badges
on:
push:
branches: [main]

permissions:
contents: write

jobs:
generate-badges:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5

# setup go environment
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.24.x

- name: coverage
id: coverage
run: |
go mod download
go test ./... -coverprofile=profile.cov
#echo -n "Total Coverage{{":"}} "
total=$(go tool cover -func profile.cov | grep '^total:' | awk '{print $3}' | sed 's/%//')
rm -f profile.cov
echo "COVERAGE_VALUE=${total}" >> $GITHUB_ENV

- uses: actions/checkout@v5
with:
repository: sgaunet/gh-action-badge
path: gh-action-badge
ref: main
fetch-depth: 1

- name: Generate coverage badge
id: coverage-badge
uses: ./gh-action-badge/.github/actions/gh-action-coverage
with:
limit-coverage: "30"
badge-label: "coverage"
badge-filename: "coverage-badge.svg"
badge-value: "${COVERAGE_VALUE}"

- name: Print url of badge
run: |
echo "Badge URL: ${{ steps.coverage-badge.outputs.badge-url }}"
34 changes: 34 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: linter

on:
push:

permissions:
contents: read

jobs:
linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v5
with:
go-version: stable
- name: Install task
uses: jaxxstorm/action-install-gh-release@v1.12.0
with:
repo: go-task/task
cache: enable
# tag:
- name: Install golangci-lint
uses: jaxxstorm/action-install-gh-release@v1.12.0
with:
repo: golangci/golangci-lint
tag: v2.4.0
cache: enable
binaries-location: golangci-lint-2.4.0-linux-amd64

- name: Run linter
shell: /usr/bin/bash {0}
run: |
task linter
61 changes: 61 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: release

on:
push:
# Pattern matched against refs/tags
tags:
- '**' # Push events to every tag including hierarchical tags like v1.0/beta

permissions:
contents: write
packages: write

jobs:
goreleaser-release:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '>=1.24'
- name: Install task
uses: jaxxstorm/action-install-gh-release@v1.12.0
with:
repo: go-task/task
# tag:
- name: Install goreleaser
uses: jaxxstorm/action-install-gh-release@v1.12.0
with:
repo: goreleaser/goreleaser
# tag:

-
# Add support for more platforms with QEMU (optional)
# https://github.com/docker/setup-qemu-action
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Create release
shell: /usr/bin/bash {0}
run: |
task release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
58 changes: 58 additions & 0 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: snapshot

on:
push:

permissions:
contents: read

jobs:
goreleaser-snapshot:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '>=1.24'
- name: Install task
uses: jaxxstorm/action-install-gh-release@v1.12.0
with:
repo: go-task/task
cache: true
# tag:
- name: Install goreleaser
uses: jaxxstorm/action-install-gh-release@v1.12.0
with:
repo: goreleaser/goreleaser
cache: true
# tag:

-
# Add support for more platforms with QEMU (optional)
# https://github.com/docker/setup-qemu-action
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Create snapshot release
shell: /usr/bin/bash {0}
run: |
task snapshot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
35 changes: 35 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Tests
on:
push:
pull_request:

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '>=1.24'

-
# Add support for more platforms with QEMU (optional)
# https://github.com/docker/setup-qemu-action
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Download dependencies
run: go mod download

- name: Verify dependencies
run: go mod verify

- name: Run unit tests
run: |
go test -v -race ./...
32 changes: 32 additions & 0 deletions .github/workflows/vulnerability-scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Vulnerability Scan

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '0 2 1 * *' # Run at 2 AM on the 1st of every month
workflow_dispatch: # Allow manual triggering

permissions:
contents: read
security-events: write

jobs:
vulnerability-scan:
runs-on: ubuntu-latest
name: Run govulncheck
steps:
- name: Check out code
uses: actions/checkout@v5

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'

- name: Run govulncheck
uses: golang/govulncheck-action@v1
with:
go-package: ./...
52 changes: 52 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

# Test binary, built with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Dependency directories (remove the comment below to include it)
# vendor/

# Go workspace file
go.work

# Built executable
postgresql-mcp

# OS generated files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# IDE files
.idea/
*.swp
*.swo
*~

# Logs
*.log

# Environment files
.env
.env.local
.env.*.local

# Database files (if any test databases are created)
*.db
*.sqlite

# Temporary files
tmp/
temp/
24 changes: 24 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
version: "2"
# Configure which files to skip during linting
run:
tests: false

linters:
default: all

disable:
- wsl
- wsl_v5
- nlreturn
- depguard
- gochecknoinits
- gochecknoglobals
- forbidigo
- varnamelen
- exhaustruct
- tagliatelle
- noinlineerr
- revive
- ireturn
- misspell
Loading
Loading