Skip to content

Commit 0f03f6d

Browse files
authored
Fix CI (#1)
* Fix CI * Fix CI * Fix CI * Fix CI * Use localhost * Use correct password Co-authored-by: hfhbd <[email protected]>
1 parent 018bbde commit 0f03f6d

File tree

2 files changed

+26
-6
lines changed

2 files changed

+26
-6
lines changed

.github/workflows/CI.yml

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,38 @@ jobs:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
os: [ ubuntu-latest, macos-latest ] #, windows-latest ]
14+
os: [ ubuntu-latest ] #, macos-latest ] #, windows-latest ]
1515
runs-on: ${{ matrix.os }}
16+
# Service containers to run with `container-job`
17+
services:
18+
# Label used to access the service container
19+
postgres:
20+
# Docker Hub image
21+
image: postgres
22+
# Provide the password for postgres
23+
env:
24+
POSTGRES_PASSWORD: password
25+
# Set health checks to wait until postgres has started
26+
options: >-
27+
--health-cmd pg_isready
28+
--health-interval 10s
29+
--health-timeout 5s
30+
--health-retries 5
31+
ports:
32+
# Maps tcp port 5432 on service container to the host
33+
- 5432:5432
1634

1735
steps:
1836
- uses: actions/checkout@v3
1937
- uses: gradle/wrapper-validation-action@v1
20-
- name: Start DB at start, because it takes some time
21-
run: docker run -e POSTGRES_PASSWORD=password -p 5432:5432 -d postgres
2238
- run: brew install libpq
2339
- uses: actions/setup-java@v3
2440
with:
2541
distribution: 'adopt'
2642
java-version: 11
2743
- run: ./gradlew assemble
28-
- run: ./gradlew test
44+
- run: ./gradlew allTests
45+
- uses: actions/upload-artifact@v3
46+
with:
47+
path: build/reports/tests
48+
if: failure()

src/nativeInterop/cinterop/libpq.def

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ package = libpq
77
compilerOpts.osx = -I/opt/homebrew/opt/libpq/include
88
linkerOpts.osx = -L/opt/homebrew/opt/libpq/lib -lpq
99

10-
compilerOpts.linux = -I/opt/homebrew/opt/libpq/include
11-
linkerOpts.linux = -L/opt/homebrew/opt/libpq/lib -lpq
10+
compilerOpts.linux = -I/home/linuxbrew/.linuxbrew/opt/libpq/include
11+
linkerOpts.linux = -L/home/linuxbrew/.linuxbrew/opt/libpq/lib -lpq

0 commit comments

Comments
 (0)