-
Notifications
You must be signed in to change notification settings - Fork 92
105 lines (104 loc) · 4.32 KB
/
ci.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
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: CI
on: [push, pull_request]
jobs:
build-job:
runs-on: ubuntu-latest
# TODO: VC: Remove line 9, same as lines 22-23; move docker compose, update packages, install Psql client & check DB connectivity above the integration tests
steps:
# - uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'adopt'
- name: Gradle Core Test
run: ./gradlew coreTest
- name: Docker Compose
run: docker-compose --env-file=env/.env.local up -d
- name: Update Packages
run:
sudo apt-get update
- name: Install Postgresql client
run:
sudo apt-get install --yes postgresql-client
- name: Check database connectivity
run: psql -h localhost -p 5400 -d banking_kata_db -U postgres -c 'SELECT 1;'
env:
PGPASSWORD: admin
- name: Gradle Adapter Test
run: ./gradlew adapterTest
env:
POSTGRES_URL: jdbc:postgresql://localhost:5400/banking_kata_db
POSTGRES_USER: postgres
POSTGRES_PASSWORD: admin
MONGO_INITDB_ROOT_USERNAME: rootuser
MONGO_INITDB_ROOT_PASSWORD: rootpass
ME_CONFIG_MONGODB_ADMINUSERNAME: rootuser
ME_CONFIG_MONGODB_ADMINPASSWORD: rootpass
ME_CONFIG_MONGODB_SERVER: mongodb
MONGODB_DATABASE_NAME: kata
MONGODB_URI: mongodb://rootuser:rootpass@localhost:27017
KEYCLOAK_REALM_URL: http://localhost:10000/auth/realms/banking-kata
KEYCLOAK_TEST_CLIENT_ID: test-client
KEYCLOAK_TEST_CLIENT_SECRET: B9N1WDFFMuZmYuEzXSbRC739YGaE7kb5
REDIS_HOST: localhost
REDIS_PORT: 6379
REDIS_PASSWORD: b4EA2xC6LlKnlizPu9bwRRrQM
- name: Gradle System Test
run: ./gradlew systemTest
env:
POSTGRES_URL: jdbc:postgresql://localhost:5400/banking_kata_db
POSTGRES_USER: postgres
POSTGRES_PASSWORD: admin
MONGO_INITDB_ROOT_USERNAME: rootuser
MONGO_INITDB_ROOT_PASSWORD: rootpass
ME_CONFIG_MONGODB_ADMINUSERNAME: rootuser
ME_CONFIG_MONGODB_ADMINPASSWORD: rootpass
ME_CONFIG_MONGODB_SERVER: mongodb
MONGODB_DATABASE_NAME: kata
MONGODB_URI: mongodb://rootuser:rootpass@localhost:27017
KEYCLOAK_REALM_URL: http://localhost:10000/auth/realms/banking-kata
KEYCLOAK_TEST_CLIENT_ID: test-client
KEYCLOAK_TEST_CLIENT_SECRET: B9N1WDFFMuZmYuEzXSbRC739YGaE7kb5
REDIS_HOST: localhost
REDIS_PORT: 6379
REDIS_PASSWORD: b4EA2xC6LlKnlizPu9bwRRrQM
- name: Gradle Test (All)
run: ./gradlew test
env:
POSTGRES_URL: jdbc:postgresql://localhost:5400/banking_kata_db
POSTGRES_USER: postgres
POSTGRES_PASSWORD: admin
MONGO_INITDB_ROOT_USERNAME: rootuser
MONGO_INITDB_ROOT_PASSWORD: rootpass
ME_CONFIG_MONGODB_ADMINUSERNAME: rootuser
ME_CONFIG_MONGODB_ADMINPASSWORD: rootpass
ME_CONFIG_MONGODB_SERVER: mongodb
MONGODB_DATABASE_NAME: kata
MONGODB_URI: mongodb://rootuser:rootpass@localhost:27017
KEYCLOAK_REALM_URL: http://localhost:10000/auth/realms/banking-kata
KEYCLOAK_TEST_CLIENT_ID: test-client
KEYCLOAK_TEST_CLIENT_SECRET: B9N1WDFFMuZmYuEzXSbRC739YGaE7kb5
REDIS_HOST: localhost
REDIS_PORT: 6379
REDIS_PASSWORD: b4EA2xC6LlKnlizPu9bwRRrQM
# TODO: Fix Code Coverage
# - name: Code Coverage
# run: ./gradlew codeCoverage
# TODO: #81 Mutation Testing - Create separate job
# - name: Mutation Testing
# run: ./gradlew mutationTest
# env:
# POSTGRES_URL: jdbc:postgresql://localhost:5400/banking_kata_db
# POSTGRES_USER: postgres
# POSTGRES_PASSWORD: admin
# MONGO_INITDB_ROOT_USERNAME: rootuser
# MONGO_INITDB_ROOT_PASSWORD: rootpass
# ME_CONFIG_MONGODB_ADMINUSERNAME: rootuser
# ME_CONFIG_MONGODB_ADMINPASSWORD: rootpass
# ME_CONFIG_MONGODB_SERVER: mongodb
# KEYCLOAK_REALM_URL: http://localhost:10000/auth/realms/banking-kata
# KEYCLOAK_TEST_CLIENT_ID: test-client
# KEYCLOAK_TEST_CLIENT_SECRET: B9N1WDFFMuZmYuEzXSbRC739YGaE7kb5