doc: support postgres #111
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: build | |
| on: | |
| push: | |
| paths-ignore: | |
| - "docs/**" | |
| - README.md | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:17-alpine | |
| env: | |
| POSTGRES_USER: redka | |
| POSTGRES_PASSWORD: redka | |
| POSTGRES_DB: redka | |
| options: >- | |
| --health-cmd "pg_isready --username=redka --dbname=redka --quiet" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 5432:5432 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: "go.mod" | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libsqlite3-dev | |
| go get . | |
| - name: Install linter | |
| uses: golangci/golangci-lint-action@v8 | |
| - name: Build and test | |
| run: | | |
| make build | |
| make vet lint | |
| make test-sqlite | |
| make test-postgres | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: redka | |
| path: build/redka | |
| retention-days: 7 |