-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: restructure before extending (#16)
* update running and tests for the different variations * restructure for extending to more implementations
- Loading branch information
Showing
32 changed files
with
683 additions
and
404 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: "Build Setup" | ||
description: "Composite action steps for setting up builds" | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Checkout - GitHub merge | ||
if: github.event.pull_request | ||
shell: bash | ||
run: |- | ||
git fetch origin pull/${{ github.event.pull_request.number }}/merge:scratch | ||
git checkout scratch | ||
- name: Cache - Coursier | ||
# https://github.com/coursier/cache-action/releases | ||
# v6.4.5 | ||
uses: coursier/cache-action@1ff273bff02a8787bc9f1877d347948af647956d | ||
|
||
- name: Coursier - set up JDK 21 | ||
# https://github.com/coursier/setup-action/releases | ||
# v1.3.5 | ||
uses: coursier/setup-action@7bde40eee928896f074dbb76d22dd772eed5c65f | ||
with: | ||
jvm: temurin:1.21 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: "Integration Test" | ||
description: "Composite action steps for running an integration test" | ||
inputs: | ||
docker-compose: | ||
required: true | ||
description: "Docker compose file to use for database setup" | ||
test-config: | ||
required: true | ||
description: "Test config to select for integration tests" | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Build setup | ||
uses: ./.github/actions/build-setup | ||
|
||
- name: Database setup | ||
shell: bash | ||
run: docker compose -f docker/docker-compose-${{ inputs.docker-compose }}.yml up --wait | ||
|
||
- name: Test | ||
shell: bash | ||
run: |- | ||
cp .jvmopts-ci .jvmopts | ||
sbt test -Dtest.config=${{ inputs.test-config }} | ||
- name: After failure - docker logs | ||
if: ${{ failure() }} | ||
shell: bash | ||
run: docker compose logs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
services: | ||
cassandra: | ||
image: cassandra:3 | ||
container_name: cassandra | ||
ports: | ||
- "9042:9042" | ||
healthcheck: | ||
test: ["CMD", "cqlsh", "-e", "describe keyspaces"] | ||
interval: 5s | ||
timeout: 5s | ||
retries: 60 | ||
|
||
postgres-db: | ||
image: postgres:latest | ||
container_name: postgres-db | ||
ports: | ||
- 5432:5432 | ||
environment: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: postgres | ||
volumes: | ||
- ./jdbc/postgres/initdb:/docker-entrypoint-initdb.d | ||
healthcheck: | ||
test: ['CMD', 'pg_isready', "-q", "-d", "postgres", "-U", "postgres"] | ||
interval: 5s | ||
retries: 5 | ||
start_period: 5s | ||
timeout: 5s |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
services: | ||
postgres-db: | ||
image: postgres:latest | ||
container_name: postgres-db | ||
ports: | ||
- 5432:5432 | ||
environment: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: postgres | ||
volumes: | ||
- ./r2dbc/postgres/initdb:/docker-entrypoint-initdb.d | ||
healthcheck: | ||
test: ['CMD', 'pg_isready', "-q", "-d", "postgres", "-U", "postgres"] | ||
interval: 5s | ||
retries: 5 | ||
start_period: 5s | ||
timeout: 5s |
File renamed without changes.
13 changes: 6 additions & 7 deletions
13
...main/resources/create_tables_postgres.sql → ...er/jdbc/postgres/initdb/create_tables.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
ddl-scripts/create_tables_postgres.sql → ...r/r2dbc/postgres/initdb/create_tables.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 6 additions & 7 deletions
13
ddl-scripts/create_tables_yugabyte.sql → ...r/r2dbc/yugabyte/initdb/create_tables.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
include "cassandra" | ||
include "local-shared" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
include "jdbc" | ||
include "local-shared" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
include "r2dbc" | ||
include "local-shared" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
akka { | ||
cluster { | ||
seed-nodes = [ | ||
"akka://[email protected]:2551", | ||
"akka://[email protected]:2552" | ||
] | ||
|
||
roles = ["write-model", "read-model"] | ||
} | ||
|
||
# For the sample, just bind to loopback and do not allow access from the network | ||
# the port is overridden by the logic in main class | ||
remote.artery { | ||
canonical.port = 0 | ||
canonical.hostname = 127.0.0.1 | ||
} | ||
} | ||
|
||
akka.management.http.hostname = "127.0.0.1" |
Oops, something went wrong.