Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
58 changes: 58 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Push Validation

on:
push:
branches: [ main, develop ]
workflow_dispatch:

permissions:
contents: read

jobs:
test:
name: Validate Push
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
cache: true

- name: Install sqlc
run: |
go install github.com/sqlc-dev/sqlc/cmd/sqlc@latest

- name: Generate sqlc code
run: |
sqlc generate --no-remote
env:
SERVICE_DB_USER: postgres
SERVICE_DB_PASSWORD: postgres
SERVICE_DB_HOST: localhost
SERVICE_DB_PORT: 5432
SERVICE_DB_NAME: postgres

- name: Download dependencies
run: go mod download

- name: Verify build
run: go build -o build/dhamps-vdb main.go

- name: Run tests
run: go test -v ./...
env:
SERVICE_DEBUG: true
SERVICE_HOST: localhost
SERVICE_PORT: 8888
SERVICE_DBHOST: localhost
SERVICE_DBPORT: 5432
SERVICE_DBUSER: postgres
SERVICE_DBPASSWORD: postgres
SERVICE_DBNAME: postgres
SERVICE_ADMINKEY: TestAdminKey123

58 changes: 58 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Test

on:
pull_request:
branches: [ main, develop ]
workflow_dispatch:

permissions:
contents: read

jobs:
test:
name: Run Tests
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
cache: true

- name: Install sqlc
run: |
go install github.com/sqlc-dev/sqlc/cmd/sqlc@latest

- name: Generate sqlc code
run: |
sqlc generate --no-remote
env:
SERVICE_DB_USER: postgres
SERVICE_DB_PASSWORD: postgres
SERVICE_DB_HOST: localhost
SERVICE_DB_PORT: 5432
SERVICE_DB_NAME: postgres

- name: Download dependencies
run: go mod download

- name: Verify build
run: go build -o build/dhamps-vdb main.go

- name: Run tests
run: go test -v ./...
env:
SERVICE_DEBUG: true
SERVICE_HOST: localhost
SERVICE_PORT: 8888
SERVICE_DBHOST: localhost
SERVICE_DBPORT: 5432
SERVICE_DBUSER: postgres
SERVICE_DBPASSWORD: postgres
SERVICE_DBNAME: postgres
SERVICE_ADMINKEY: TestAdminKey123

Loading