-
Notifications
You must be signed in to change notification settings - Fork 3
61 lines (57 loc) · 1.67 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Java CI with Gradle
on:
push:
branches: [ main, dev ]
pull_request:
branches: [ main, dev ]
jobs:
build:
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ ubuntu-latest ]
# Setup Cottontail DB and PostgreSQL service container
services:
cottontail:
image: vitrivr/cottontaildb:0.16.8
ports:
- 1865:1865
options: -it
pgvector:
image: pgvector/pgvector:pg16
ports:
- 5432:5432
env:
POSTGRES_PASSWORD: vitrivr
# Start actual job.
steps:
- name: Set up Xvfb
run: Xvfb :1 -ac -screen 0 1024x768x24 &
- name: Checkout code
uses: actions/checkout@v4
- name: Cottontail DB connection test
run: nc -zv 127.0.0.1 1865
- name: PostgreSQL connection test
run: nc -zv 127.0.0.1 5432
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Cache Gradle packages
uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Test with gradle ubuntu
if: matrix.os == 'ubuntu-latest'
run: ./gradlew test --info
- name: Test with gradle windows
if: matrix.os == 'windows-latest'
run: ./gradlew test --info
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: success() || failure() # always run even if the previous step fails
with:
report_paths: '**/build/test-results/test/TEST-*.xml'