Repository navigation
77 lines (72 loc) · 2.54 KB
/
Copy pathjava.yml
File metadata and controls
77 lines (72 loc) · 2.54 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
name: java
on:
pull_request:
paths-ignore:
- "infra/**"
- "trader-app-ui/**"
- "**/*.md"
push:
branches: [master]
paths-ignore:
- "infra/**"
- "trader-app-ui/**"
- "**/*.md"
permissions:
contents: read
# ./mvnw pins Maven 3.5.4: spring-cloud-contract-maven-plugin 2.0.0 fails to load on the runner's Maven 3.9
# (ClassNotFoundException org.eclipse.aether.impl.SyncContextFactory).
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "8"
cache: maven
- name: Unit tests (Java 8)
run: ./mvnw -B test
kubernetes-profile:
# Both apps on SPRING_PROFILES_ACTIVE=kubernetes against docker-compose.yml with only env vars, Flyway + validate,
# health/Prometheus, and orders/portfolios unchanged across a restart; once from the jars, once from the Jib images.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "8"
cache: maven
- name: Build jars and Jib images
run: ./mvnw -B -DskipTests package jib:dockerBuild
- name: verify-kubernetes-profile.sh (jars)
run: ESARCH_RESET=1 ci/local/verify-kubernetes-profile.sh
- name: verify-kubernetes-profile.sh (Jib images)
run: ESARCH_RESET=1 ESARCH_RUNTIME=image LOGS=target/verify-kubernetes-image ci/local/verify-kubernetes-profile.sh
- name: App logs
if: always()
run: tail -n 200 target/verify-kubernetes*/*.log || true
- name: Stop compose
if: always()
run: docker compose down -v
migrate-data:
# s6.1 rehearsal: MySQL 5.7 source seeded through the buy/sell API, copied into the Flyway-baselined MySQL 8.0
# target with tools/migrate-data, verify.sh matching, apps healthy on the copy and trading on it.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "8"
cache: maven
- name: Build jars
run: ./mvnw -B -DskipTests package
- name: shellcheck
run: shellcheck -x tools/migrate-data/*.sh tools/migrate-data/rehearsal/target-initdb/*.sh
- name: rehearse.sh
run: SEED_ROUNDS=100 tools/migrate-data/rehearse.sh
- name: App logs
if: always()
run: tail -n 200 target/migrate-data/rehearsal/*.log || true