Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

github ci: test #105

Merged
merged 3 commits into from
May 10, 2024
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
1 change: 0 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,5 @@ jobs:
uses: actions/setup-go@v5
with:
go-version: 1.22.2
# You can test your matrix by printing the current Go version
- name: Build planet-registry
run: make build
42 changes: 42 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Test

on: [pull_request]

jobs:
Test:
runs-on: ubuntu-latest

services:
postgres:
image: postgres

env:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: planet-registry

options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432

steps:
- uses: actions/checkout@v4
- name: Setup Go 1.22.2
uses: actions/setup-go@v5
with:
go-version: 1.22.2
- name: Run tests
run: make test
env:
JWT_SECRET: secret
DB_HOST: localhost
DB_USER: postgres
DB_PASSWORD: postgres
DB_NAME: planet-registry
DB_PORT: 5432
DB_DRIVER: postgres
PORT: 8000