Skip to content

Quickstart Demo Update #15

Quickstart Demo Update

Quickstart Demo Update #15

Workflow file for this run

name: CI for Hello world demo
on:
push:
branches: [ "main" ]
paths:
- 'hello-world/**'
- '.github/workflows/hello-world.yml'
pull_request:
types:
- ready_for_review
- opened
- reopened
- synchronize
paths:
- 'hello-world/**'
- '.github/workflows/hello-world.yml'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
# Service container for Postgres
services:
# Label used to access the service container.
postgres:
image: postgres:16
env:
# Specify the password for Postgres superuser.
POSTGRES_PASSWORD: dbos
# 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: "Setup postgres config"
run: |
docker exec -i ${{ job.services.postgres.id }} apt update
docker exec -i ${{ job.services.postgres.id }} apt install -y postgresql-15-wal2json
docker exec ${{ job.services.postgres.id }} sh -c 'echo "wal_level=logical" >> /var/lib/postgresql/data/postgresql.conf'
docker restart ${{ job.services.postgres.id }}
- name: Checkout demo app
uses: actions/checkout@v3
with:
path: operon-demo-apps
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install psql
run: |
sudo apt-get update
sudo apt-get install -y postgresql-client coreutils
- name: Setup Postgres
run: ./operon-demo-apps/hello-world/init_database.sh
env:
PGPASSWORD: dbos
- name: Compile Hello World
working-directory: operon-demo-apps/hello-world
run: |
npm install
npm run build
env:
NPM_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}