Run postgres inside the test runner

This commit is contained in:
Sean M. Collins 2025-03-10 17:25:40 -04:00
parent 22688ccaa3
commit c6ce935ce1

View File

@ -18,6 +18,12 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest] os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
# Create postgres server
# https://github.com/marketplace/actions/setup-postgresql-for-linux-macos-windows
- uses: ikalnytskyi/action-setup-postgres@v7
with:
database: test
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
@ -43,7 +49,13 @@ jobs:
- name: Run App Tests - name: Run App Tests
run: | run: |
cd demo cd demo
zig build -Denvironment=testing jetzig:database:create
zig build -Denvironment=testing jetzig:test zig build -Denvironment=testing jetzig:test
env:
JETQUERY_HOSTNAME='localhost'
JETQUERY_USERNAME='postgres'
JETQUERY_PASSWORD='postgres'
JETQUERY_DATABASE='test'
- name: Build artifacts - name: Build artifacts
if: ${{ matrix.os == 'ubuntu-latest' }} if: ${{ matrix.os == 'ubuntu-latest' }}