Skip to content

feat: Mark snapshot envelopes with snapshot source #1003

feat: Mark snapshot envelopes with snapshot source

feat: Mark snapshot envelopes with snapshot source #1003

Workflow file for this run

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-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-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