doc: Data partitions #1131
Workflow file for this run
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
name: Validate and test | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
tags-ignore: [ v.* ] | |
permissions: | |
contents: read | |
jobs: | |
check-code-style: | |
name: Checks | |
runs-on: ubuntu-22.04 | |
if: github.repository == 'akka/akka-persistence-r2dbc' | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
with: | |
# we don't know what commit the last tag was it's safer to get entire repo so previousStableVersion resolves | |
fetch-depth: 0 | |
- name: Checkout GitHub merge | |
if: github.event.pull_request | |
run: |- | |
git fetch origin pull/${{ github.event.pull_request.number }}/merge:scratch | |
git checkout scratch | |
- name: Cache Coursier cache | |
uses: coursier/[email protected] | |
- name: Set up JDK 11 | |
uses: coursier/[email protected] | |
with: | |
jvm: temurin:1.11.0 | |
- name: Code style check, compilation and binary-compatibility check | |
run: |- | |
cp .jvmopts-ci .jvmopts | |
sbt scalafmtCheckAll scalafmtSbtCheck headerCheck mimaReportBinaryIssues +Test/compile | |
test-postgres: | |
name: Run test with Postgres | |
runs-on: ubuntu-22.04 | |
if: github.repository == 'akka/akka-persistence-r2dbc' | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- name: Checkout GitHub merge | |
if: github.event.pull_request | |
run: |- | |
git fetch origin pull/${{ github.event.pull_request.number }}/merge:scratch | |
git checkout scratch | |
- name: Cache Coursier cache | |
uses: coursier/[email protected] | |
- name: Set up JDK 11 | |
uses: coursier/[email protected] | |
with: | |
jvm: temurin:1.11.0 | |
- name: Start DB | |
run: |- | |
docker compose -f docker/docker-compose-postgres.yml up --wait | |
docker exec -i postgres-db psql -U postgres -t < ddl-scripts/create_tables_postgres.sql | |
- name: sbt test | |
run: |- | |
cp .jvmopts-ci .jvmopts | |
sbt test | |
test-postgres-jsonb: | |
name: Run test with Postgres and JSONB payload | |
runs-on: ubuntu-22.04 | |
if: github.repository == 'akka/akka-persistence-r2dbc' | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- name: Checkout GitHub merge | |
if: github.event.pull_request | |
run: |- | |
git fetch origin pull/${{ github.event.pull_request.number }}/merge:scratch | |
git checkout scratch | |
- name: Cache Coursier cache | |
uses: coursier/[email protected] | |
- name: Set up JDK 11 | |
uses: coursier/[email protected] | |
with: | |
jvm: temurin:1.11.0 | |
- name: Start DB | |
run: |- | |
docker compose -f docker/docker-compose-postgres.yml up --wait | |
docker exec -i postgres-db psql -U postgres -t < ddl-scripts/create_tables_postgres_jsonb.sql | |
- name: sbt test | |
run: |- | |
cp .jvmopts-ci .jvmopts | |
sbt -Dakka.persistence.r2dbc.journal.payload-column-type=JSONB \ | |
-Dakka.persistence.r2dbc.snapshot.payload-column-type=JSONB \ | |
-Dakka.persistence.r2dbc.state.payload-column-type=JSONB \ | |
"core/testOnly akka.persistence.r2dbc.PayloadSpec" | |
test-postgres-data-partitions: | |
name: Run test with Postgres and several data partitions | |
runs-on: ubuntu-22.04 | |
if: github.repository == 'akka/akka-persistence-r2dbc' | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- name: Checkout GitHub merge | |
if: github.event.pull_request | |
run: |- | |
git fetch origin pull/${{ github.event.pull_request.number }}/merge:scratch | |
git checkout scratch | |
- name: Cache Coursier cache | |
uses: coursier/[email protected] | |
- name: Set up JDK 11 | |
uses: coursier/[email protected] | |
with: | |
jvm: temurin:1.11.0 | |
- name: Start DB | |
run: |- | |
docker compose -f docker/docker-compose-postgres-2.yml up --wait | |
docker exec -i postgres-db-0 psql -U postgres -t < ddl-scripts/create_tables_postgres_0-1.sql | |
docker exec -i postgres-db-1 psql -U postgres -t < ddl-scripts/create_tables_postgres_2-3.sql | |
- name: sbt test | |
run: |- | |
cp .jvmopts-ci .jvmopts | |
sbt -Dconfig.resource=application-postgres-data-partitions.conf test | |
test-yugabyte: | |
name: Run tests with Yugabyte | |
runs-on: ubuntu-22.04 | |
if: github.repository == 'akka/akka-persistence-r2dbc' | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- name: Checkout GitHub merge | |
if: github.event.pull_request | |
run: |- | |
git fetch origin pull/${{ github.event.pull_request.number }}/merge:scratch | |
git checkout scratch | |
- name: Cache Coursier cache | |
uses: coursier/[email protected] | |
- name: Set up JDK 11 | |
uses: coursier/[email protected] | |
with: | |
jvm: temurin:1.11.0 | |
- name: Start DB | |
run: |- | |
docker-compose -f docker/docker-compose-yugabyte.yml up -d | |
# TODO: could we poll the port instead of sleep? | |
sleep 10 | |
docker exec -i yb-tserver-n1 /home/yugabyte/bin/ysqlsh -h yb-tserver-n1 -t < ddl-scripts/create_tables_yugabyte.sql | |
- name: sbt test | |
run: |- | |
cp .jvmopts-ci .jvmopts | |
sbt -Dconfig.resource=application-yugabyte.conf test | |
test-h2: | |
name: Run test with H2 | |
runs-on: ubuntu-22.04 | |
if: github.repository == 'akka/akka-persistence-r2dbc' | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- name: Checkout GitHub merge | |
if: github.event.pull_request | |
run: |- | |
git fetch origin pull/${{ github.event.pull_request.number }}/merge:scratch | |
git checkout scratch | |
- name: Cache Coursier cache | |
uses: coursier/[email protected] | |
- name: Set up JDK 11 | |
uses: coursier/[email protected] | |
with: | |
jvm: temurin:1.11.0 | |
- name: sbt test | |
run: |- | |
cp .jvmopts-ci .jvmopts | |
sbt -Dconfig.resource=application-h2.conf test | |
test-sqlserver: | |
name: Run test with SQL Server | |
runs-on: ubuntu-22.04 | |
if: github.repository == 'akka/akka-persistence-r2dbc' | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- name: Checkout GitHub merge | |
if: github.event.pull_request | |
run: |- | |
git fetch origin pull/${{ github.event.pull_request.number }}/merge:scratch | |
git checkout scratch | |
- name: Cache Coursier cache | |
uses: coursier/[email protected] | |
- name: Set up JDK 11 | |
uses: coursier/[email protected] | |
with: | |
jvm: temurin:1.11.0 | |
- name: Start DB | |
run: |- | |
docker compose -f docker/docker-compose-sqlserver.yml up --wait | |
docker exec -i sqlserver-db /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P '<YourStrong@Passw0rd>' -d master < ddl-scripts/create_tables_sqlserver.sql | |
- name: sbt test | |
run: |- | |
cp .jvmopts-ci .jvmopts | |
sbt -Dconfig.resource=application-sqlserver.conf test | |
test-docs: | |
name: Docs | |
runs-on: ubuntu-22.04 | |
if: github.repository == 'akka/akka-persistence-r2dbc' | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- name: Checkout GitHub merge | |
if: github.event.pull_request | |
run: |- | |
git fetch origin pull/${{ github.event.pull_request.number }}/merge:scratch | |
git checkout scratch | |
- name: Cache Coursier cache | |
uses: coursier/[email protected] | |
- name: Set up JDK 11 | |
uses: coursier/[email protected] | |
with: | |
jvm: temurin:1.11.0 | |
- name: Run Paradox | |
run: |- | |
cp .jvmopts-ci .jvmopts | |
sbt docs/paradox |