Skip to content

Commit

Permalink
Merge pull request #105 from the-fourth-dimension/github-ci-test
Browse files Browse the repository at this point in the history
github ci: test
  • Loading branch information
probablyArth authored May 10, 2024
2 parents 3ac185d + 6273800 commit 0078b31
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
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

0 comments on commit 0078b31

Please sign in to comment.