Skip to content

Commit

Permalink
build: Fold integration tests into one build matrix (#819)
Browse files Browse the repository at this point in the history
Also: add nightly build matrix on JDK 21
  • Loading branch information
johanandren authored Mar 25, 2024
1 parent 3f89c23 commit 2ead035
Show file tree
Hide file tree
Showing 9 changed files with 140 additions and 268 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
push:
branches:
- main
- master
tags-ignore: [ v.* ]

permissions:
Expand Down Expand Up @@ -67,7 +66,7 @@ jobs:
# Run locally with: sbt 'clean ; +Test/compile ; +It/compile'
run: sbt "; Test/compile"

- name: Compile all code with fatal warnings for Java 11 and Scala 3.3
- name: Compile all code with Scala 3.3
run: sbt "++3.3; Test/compile"

check-docs:
Expand Down
53 changes: 0 additions & 53 deletions .github/workflows/h2-test.yml

This file was deleted.

53 changes: 0 additions & 53 deletions .github/workflows/mysql-tests.yml

This file was deleted.

53 changes: 0 additions & 53 deletions .github/workflows/oracle-tests.yml

This file was deleted.

53 changes: 0 additions & 53 deletions .github/workflows/postgres-tests.yml

This file was deleted.

1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- main
- master
tags: ["v*"]

permissions:
Expand Down
53 changes: 0 additions & 53 deletions .github/workflows/sqlserver-tests.yml

This file was deleted.

75 changes: 75 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Integration Tests

on:
pull_request:
push:
branches:
- main
tags-ignore: [ v.* ]

permissions:
contents: read

jobs:
integration-test:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
db:
- name: "H2"
test: "test"
- name: "MySQL"
test: '"integration/testOnly akka.persistence.jdbc.integration.MySQL*"'
script: 'launch-mysql.sh'
hasOldDao: true
- name: "Oracle"
test: '"integration/testOnly akka.persistence.jdbc.integration.Oracle*"'
script: 'launch-oracle.sh'
hasOldDao: true
- name: "Postgres"
test: '"integration/testOnly akka.persistence.jdbc.integration.Postgres*"'
script: 'launch-postgres.sh'
hasOldDao: true
- name: "SqlServer"
test: '"integration/testOnly akka.persistence.jdbc.integration.SqlServer*"'
script: 'launch-sqlserver.sh'
hasOldDao: true
name: Integration Test ${{ matrix.db.name }}

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 in docker container
if: ${{ matrix.db.script }}
run: |-
./scripts/${{ matrix.db.script }}
- name: Run Integration tests for ${{ matrix.db.name }}
run: sbt ${{ matrix.db.test }} ${{ matrix.old-dao.extraOpts }}

- name: Run Integration tests for ${{ matrix.db.name }} (old dao)
if: ${{ matrix.db.hasOldDao }}
run: sbt ${{ matrix.db.test }} ${{ matrix.old-dao.extraOpts }} -Djdbc-journal.dao=akka.persistence.jdbc.journal.dao.legacy.ByteArrayJournalDao -Djdbc-snapshot-store.dao=akka.persistence.jdbc.snapshot.dao.legacy.ByteArraySnapshotDao -Djdbc-read-journal.dao=akka.persistence.jdbc.query.dao.legacy.ByteArrayReadJournalDao


- name: Print logs on failure
if: ${{ failure() }}
run: find . -name "*.log" -exec ./scripts/cat-log.sh {} \;
Loading

0 comments on commit 2ead035

Please sign in to comment.