Repository navigation
86 lines (75 loc) · 2.38 KB
/
Copy pathci.yml
File metadata and controls
86 lines (75 loc) · 2.38 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: CI
on:
push:
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CI_DB_NAME: zipzip_server_test
CI_DB_USERNAME: test_zipzip
CI_DB_PASSWORD: test_zipzip_password
jobs:
build:
name: Build and test
runs-on: ubuntu-latest
services:
postgres:
image: postgres:18
env:
POSTGRES_DB: ${{ env.CI_DB_NAME }}
POSTGRES_USER: ${{ env.CI_DB_USERNAME }}
POSTGRES_PASSWORD: ${{ env.CI_DB_PASSWORD }}
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U $POSTGRES_USER -d $POSTGRES_DB"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
- name: Create CI application secret
run: |
mkdir -p src/main/resources/config
cat > src/main/resources/config/application-secret.yml <<EOF
spring:
datasource:
url: jdbc:postgresql://localhost:5432/${CI_DB_NAME}
username: ${CI_DB_USERNAME}
password: ${CI_DB_PASSWORD}
driver-class-name: org.postgresql.Driver
jwt:
issuer: zipzip-server-ci
access-secret: ci-access-secret-must-be-at-least-32-characters
refresh-secret: ci-refresh-secret-must-be-at-least-32-characters
access-token-expiration: 30m
refresh-token-expiration: 14d
apple:
team-id: ci-apple-team-id
client-id: ci-apple-client-id
key-id: ci-apple-key-id
private-key: ci-apple-private-key
idempotency:
auth-response-encryption-key: ci-idempotency-secret-must-be-at-least-32-characters
auth-response-ttl: 10m
storage:
endpoint: https://ci.compat.objectstorage.ci.oraclecloud.com
region: ci-region
bucket: ci-bucket
access-key: ci-access-key
secret-key: ci-secret-key
EOF
- name: Run verification
run: ./gradlew --no-daemon check