mirror of
https://github.com/getml/sqlgen.git
synced 2026-01-04 08:30:30 -06:00
Added a postgres container
This commit is contained in:
39
.github/workflows/linux-postgres-cxx20.yaml
vendored
Normal file
39
.github/workflows/linux-postgres-cxx20.yaml
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
name: linux-postgres-cxx20
|
||||
|
||||
on: [ pull_request, workflow_dispatch ]
|
||||
|
||||
jobs:
|
||||
container-job:
|
||||
runs-on: ubuntu-24.04
|
||||
container: node:20-bookworm-slim
|
||||
|
||||
services:
|
||||
postgres:
|
||||
image: postgres
|
||||
env:
|
||||
POSTGRES_PASSWORD: postgres
|
||||
options: >-
|
||||
--health-cmd pg_isready
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Performs a clean installation of all dependencies in the `package.json` file
|
||||
# For more information, see https://docs.npmjs.com/cli/ci.html
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Connect to PostgreSQL
|
||||
# Runs a script that creates a PostgreSQL table, populates
|
||||
# the table with data, and then retrieves the data.
|
||||
run: node client.js
|
||||
# Environment variables used by the `client.js` script to create a new PostgreSQL table.
|
||||
env:
|
||||
# The hostname used to communicate with the PostgreSQL service container
|
||||
POSTGRES_HOST: postgres
|
||||
# The default PostgreSQL port
|
||||
POSTGRES_PORT: 5432
|
||||
Reference in New Issue
Block a user