You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
861 B
35 lines
861 B
name: database
|
|
on: [push]
|
|
jobs:
|
|
database-creation:
|
|
runs-on: ubuntu-latest
|
|
|
|
services:
|
|
# Label used to access the service container
|
|
postgres:
|
|
image: postgres
|
|
env:
|
|
POSTGRES_PASSWORD: postgres
|
|
# Set health checks to wait until postgres has started
|
|
options: >-
|
|
--health-cmd pg_isready
|
|
--health-interval 10s
|
|
--health-timeout 5s
|
|
--health-retries 5
|
|
ports:
|
|
# Maps tcp port 5432 on service container to the host
|
|
- 5432:5432
|
|
|
|
steps:
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install dependencies
|
|
run: pip3 install mariadb
|
|
|
|
- name: Connect to PostgreSQL
|
|
run: python3 database/db-creation.py
|
|
env:
|
|
POSTGRES_HOST: postgres
|
|
POSTGRES_PORT: 5432
|