-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (47 loc) · 1.22 KB
/
test.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
name: Test
on:
push:
branches:
- '**'
jobs:
build-and-test:
name: "Migrate, Build & Test"
runs-on: ubuntu-latest
env:
ABLY_API_KEY: ${{ secrets.ABLY_PUBLISH_ONLY_TEST_KEY }}
JWT_SECRET: key-for-tests
LOG_LEVEL: info
PORT: 8080
STABLE_DB_PASSWORD: db.password
STABLE_DB_USER: postgres
STABLE_DB_MAX_CONNECTIONS: 10
STABLE_JDBC_URL: jdbc:postgresql://localhost:5432/postgres
STABLE_TEAM: test
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_PASSWORD: db.password
options: >-
--health-cmd "pg_isready -U postgres"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
volumes:
- postgres-data:/var/lib/postgresql/data
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up JDK 17 (Corretto)
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'corretto'
- name: Install
run: ./gradlew --quiet dependencies
- name: Migrate
run: ./gradlew migrate
- name: Test
run: ./gradlew test