Skip to content

Commit

Permalink
Set up postgres service
Browse files Browse the repository at this point in the history
  • Loading branch information
kritika-singh3 committed Dec 30, 2020
1 parent 4d1bd94 commit e6dec48
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,23 @@ on:
jobs:
build_and_release:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:9.6
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 20s
--health-retries 10
ports:
- 5432:5432
env:
GITHUB_USER: "gocd"
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
PRERELEASE: "${{ github.event.inputs.prerelease }}"
PGPASSWORD: postgres
steps:
- uses: actions/checkout@v2
with:
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/test_and_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@ on:
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:9.6
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 20s
--health-retries 10
ports:
- 5432:5432
steps:
- uses: actions/checkout@v2
- name: Set up JDK
Expand All @@ -18,12 +30,27 @@ jobs:
java-version: 15
- name: Test with Gradle
run: ./gradlew assemble check
env:
PGPASSWORD: postgres
previewGithubRelease:
needs: test
runs-on: ubuntu-latest
services:
postgres:
image: postgres:9.6
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 20s
--health-retries 10
ports:
- 5432:5432
env:
GITHUB_USER: "gocd"
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
PGPASSWORD: postgres
steps:
- uses: actions/checkout@v2
with:
Expand Down

0 comments on commit e6dec48

Please sign in to comment.