mirror of
https://github.com/getml/sqlgen.git
synced 2026-01-07 01:50:09 -06:00
40 lines
1.2 KiB
YAML
40 lines
1.2 KiB
YAML
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
|