Retry with Postgres service
This commit is contained in:
parent
b6a6b32e11
commit
eeec0d51c4
1 changed files with 30 additions and 30 deletions
60
.github/workflows/maven.yml
vendored
60
.github/workflows/maven.yml
vendored
|
|
@ -14,43 +14,43 @@ jobs:
|
|||
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
# services:
|
||||
# postgres:
|
||||
# image: postgres:latest
|
||||
# env:
|
||||
# POSTGRES_DB: libreplandev
|
||||
# POSTGRES_PASSWORD: libreplan
|
||||
# POSTGRES_USER: libreplan
|
||||
# ports:
|
||||
# - 5432:5432
|
||||
# # Set health checks to wait until postgres has started
|
||||
# options: >-
|
||||
# --health-cmd pg_isready
|
||||
# --health-interval 10s
|
||||
# --health-timeout 5s
|
||||
# --health-retries 5
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:13.0
|
||||
env:
|
||||
POSTGRES_DB: libreplandev
|
||||
POSTGRES_PASSWORD: libreplan
|
||||
POSTGRES_USER: libreplan
|
||||
ports:
|
||||
- 5432:5432
|
||||
# Set health checks to wait until postgres has started
|
||||
options: >-
|
||||
--health-cmd pg_isready
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Start PostgreSQL on Ubuntu
|
||||
run: |
|
||||
sudo systemctl start postgresql.service
|
||||
pg_isready
|
||||
# - name: Start PostgreSQL on Ubuntu
|
||||
# run: |
|
||||
# sudo systemctl start postgresql.service
|
||||
# pg_isready
|
||||
|
||||
- name: Set scram password encryption
|
||||
run: |
|
||||
sudo -u postgres psql --command="ALTER SYSTEM SET password_encryption = 'scram-sha-256';"
|
||||
# - name: Set scram password encryption
|
||||
# run: |
|
||||
# sudo -u postgres psql --command="ALTER SYSTEM SET password_encryption = 'scram-sha-256';"
|
||||
|
||||
- name: Create libreplan user
|
||||
run: |
|
||||
sudo -u postgres psql --command="CREATE USER libreplan PASSWORD 'libreplan'; "
|
||||
#" --command="\du"
|
||||
# - name: Create libreplan user
|
||||
# run: |
|
||||
# sudo -u postgres psql --command="CREATE USER libreplan PASSWORD 'libreplan'; "
|
||||
##" --command="\du"
|
||||
|
||||
- name: Create libreplandev database
|
||||
run: |
|
||||
sudo -u postgres createdb --owner=libreplan libreplandev
|
||||
PGPASSWORD=libreplan psql --username=libreplan --host=localhost --list libreplandev
|
||||
# - name: Create libreplandev database
|
||||
# run: |
|
||||
# sudo -u postgres createdb --owner=libreplan libreplandev
|
||||
# PGPASSWORD=libreplan psql --username=libreplan --host=localhost --list libreplandev
|
||||
|
||||
- name: Set up JDK 8
|
||||
uses: actions/setup-java@v3
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue