Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,25 @@ jobs:
- uses: actions/checkout@v4

- uses: ikalnytskyi/action-setup-postgres@v8
if: runner.os != 'Windows'
id: postgres

- name: Put libpq.dll on the PATH
# The Windows runner ships PostgreSQL; the action would download and
# extract an installer instead, which takes minutes
- name: Start the preinstalled PostgreSQL
if: runner.os == 'Windows'
run: echo "$PGBIN" >> "$GITHUB_PATH"
run: |
sc.exe config postgresql-x64-14 start= demand
net start postgresql-x64-14
echo "$PGBIN" >> "$GITHUB_PATH"

- name: Install babashka dev build
run: |
bash <(curl -s https://raw.githubusercontent.com/babashka/babashka/master/install) --dev-build --dir . --dynamic

- name: Run tests
env:
PG_TEST_CONNINFO: ${{ steps.postgres.outputs.connection-uri }}
PG_TEST_CONNINFO: ${{ steps.postgres.outputs.connection-uri || 'postgresql://postgres:root@localhost:5432/postgres' }}
run: |
if [ "$RUNNER_OS" = "Windows" ]; then bb=./bb.exe; else bb=./bb; fi
"$bb" test:bb
Expand All @@ -48,11 +54,17 @@ jobs:
- uses: actions/checkout@v4

- uses: ikalnytskyi/action-setup-postgres@v8
if: runner.os != 'Windows'
id: postgres

- name: Put libpq.dll on the PATH
# The Windows runner ships PostgreSQL; the action would download and
# extract an installer instead, which takes minutes
- name: Start the preinstalled PostgreSQL
if: runner.os == 'Windows'
run: echo "$PGBIN" >> "$GITHUB_PATH"
run: |
sc.exe config postgresql-x64-14 start= demand
net start postgresql-x64-14
echo "$PGBIN" >> "$GITHUB_PATH"

- uses: actions/setup-java@v4
with:
Expand All @@ -65,5 +77,5 @@ jobs:

- name: Run tests
env:
PG_TEST_CONNINFO: ${{ steps.postgres.outputs.connection-uri }}
PG_TEST_CONNINFO: ${{ steps.postgres.outputs.connection-uri || 'postgresql://postgres:root@localhost:5432/postgres' }}
run: clojure -M:test
Loading