mirror of
https://github.com/simple-login/app.git
synced 2025-02-24 07:43:54 +08:00
add postgres to github action
This commit is contained in:
parent
142dcafb99
commit
a13953e13f
2 changed files with 28 additions and 1 deletions
27
.github/workflows/main.yml
vendored
27
.github/workflows/main.yml
vendored
|
@ -11,6 +11,33 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
python-version: [3.7]
|
python-version: [3.7]
|
||||||
|
|
||||||
|
# service containers to run with `postgres-job`
|
||||||
|
services:
|
||||||
|
# label used to access the service container
|
||||||
|
postgres:
|
||||||
|
# Docker Hub image
|
||||||
|
image: postgres:13
|
||||||
|
# service environment variables
|
||||||
|
# `POSTGRES_HOST` is `postgres`
|
||||||
|
env:
|
||||||
|
# optional (defaults to `postgres`)
|
||||||
|
POSTGRES_DB: test
|
||||||
|
# required
|
||||||
|
POSTGRES_PASSWORD: test
|
||||||
|
# optional (defaults to `5432`)
|
||||||
|
POSTGRES_PORT: 5432
|
||||||
|
# optional (defaults to `postgres`)
|
||||||
|
POSTGRES_USER: test
|
||||||
|
ports:
|
||||||
|
# maps tcp port 5432 on service container to the host
|
||||||
|
- 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:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ DKIM_PRIVATE_KEY_PATH=local_data/dkim.key
|
||||||
|
|
||||||
# Database
|
# Database
|
||||||
RESET_DB=true
|
RESET_DB=true
|
||||||
DB_URI=postgresql://db/test
|
DB_URI=postgresql://test:test@localhost:5432/test
|
||||||
|
|
||||||
# Flask
|
# Flask
|
||||||
FLASK_SECRET=secret
|
FLASK_SECRET=secret
|
||||||
|
|
Loading…
Reference in a new issue