From b5b1753d7dc8c84ca145f670b3b2d1a4302c27fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20MIELCAREK?= <94568134+felixmielcarek@users.noreply.github.com> Date: Fri, 31 May 2024 13:09:58 +0200 Subject: [PATCH] Create database.yml --- .github/workflows/database.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/database.yml diff --git a/.github/workflows/database.yml b/.github/workflows/database.yml new file mode 100644 index 0000000..91ea2ef --- /dev/null +++ b/.github/workflows/database.yml @@ -0,0 +1,34 @@ +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