-
Notifications
You must be signed in to change notification settings - Fork 18
64 lines (55 loc) · 1.32 KB
/
test.yml
File metadata and controls
64 lines (55 loc) · 1.32 KB
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
62
63
64
name: Test
on:
workflow_call:
workflow_dispatch:
push:
branches:
- main
- 'release/*'
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: sibedge/postgres-plv8:16.3-3.2.2
env:
POSTGRES_PASSWORD: dbos
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up OpenJDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: wrapper
- name: Wait for PostgreSQL
run: |
until pg_isready -h localhost -p 5432 -U postgres; do
echo "Waiting for PostgreSQL..."
sleep 2
done
env:
PGPASSWORD: dbos
- name: Run tests
run: ./gradlew clean test
env:
PGPASSWORD: dbos
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results
path: |
build/reports/tests/
build/test-results/