-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (48 loc) · 1.19 KB
/
test.yaml
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
name: tests
on:
push:
branches:
- main
- master
pull_request:
types:
- opened
- synchronize
- reopened
jobs:
gradle-test:
name: "Run tests on JVM with gradle"
runs-on: ubuntu-latest
services:
db:
image: postgres:17.2
ports:
- 5432:5432
env:
POSTGRES_DB: aisu_test
POSTGRES_USER: aisu
POSTGRES_PASSWORD: 4ab4008b362142c391cc9e1ab98addc6b25f00f5
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis:7.4.1
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '21'
cache: 'gradle'
- run: ./gradlew build -x test --no-daemon
- run: ./gradlew migrateTestingDatabase --no-daemon
- run: ./gradlew test --no-daemon