Update sbt-java-formatter to 0.10.0 (#291) #693
This file contains hidden or 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.* ] | |
| jobs: | |
| compile: | |
| name: Test and compile | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| SCALA_VERSION: [ 2.13, 3.3 ] | |
| JAVA_VERSION: [ 17, 21 ] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| - name: Setup Java ${{ matrix.JAVA_VERSION }} | |
| uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0 | |
| with: | |
| distribution: temurin | |
| java-version: ${{ matrix.JAVA_VERSION }} | |
| - name: Install sbt | |
| uses: sbt/setup-sbt@a627500d27445f8c5021755a439829b6e78e3358 # v1.1.15 | |
| - name: Cache Coursier cache | |
| uses: coursier/cache-action@bebeeb0e6f48ebad66d3783946588ecf43114433 # 6.4.7 | |
| - name: Enable jvm-opts | |
| run: cp .jvmopts-ci .jvmopts | |
| - name: Compile and test for JDK ${{ matrix.JAVA_VERSION }}, Scala ${{ matrix.SCALA_VERSION }} | |
| run: sbt ++${{ matrix.SCALA_VERSION }} test:compile | |
| test-postgres: | |
| name: Run test with Postgres | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| SCALA_VERSION: [ 2.13, 3.3 ] | |
| JAVA_VERSION: [ 17 ] | |
| if: github.repository == 'apache/pekko-persistence-r2dbc' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| - 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: Setup Java ${{ matrix.JAVA_VERSION }} | |
| uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0 | |
| with: | |
| distribution: temurin | |
| java-version: ${{ matrix.JAVA_VERSION }} | |
| - name: Install sbt | |
| uses: sbt/setup-sbt@a627500d27445f8c5021755a439829b6e78e3358 # v1.1.15 | |
| - name: Cache Coursier cache | |
| uses: coursier/cache-action@bebeeb0e6f48ebad66d3783946588ecf43114433 # 6.4.7 | |
| - name: Enable jvm-opts | |
| run: cp .jvmopts-ci .jvmopts | |
| - name: Start DB | |
| run: |- | |
| docker compose -f docker/docker-compose-postgres.yml up -d | |
| # TODO: could we poll the port instead of sleep? | |
| sleep 10 | |
| docker exec -i docker-postgres-db-1 psql -U postgres -t < ddl-scripts/create_tables_postgres.sql | |
| docker exec -i docker-postgres-db-1 psql -U postgres -t -c 'CREATE DATABASE database1;' | |
| docker exec -i docker-postgres-db-1 psql -U postgres -t -d database1 < ddl-scripts/create_tables_postgres.sql | |
| docker exec -i docker-postgres-db-1 psql -U postgres -t -c 'CREATE DATABASE database2;' | |
| docker exec -i docker-postgres-db-1 psql -U postgres -t -d database2 < ddl-scripts/create_tables_postgres.sql | |
| - name: test | |
| run: sbt ++${{ matrix.SCALA_VERSION }} test | |
| test-yugabyte: | |
| name: Run tests with Yugabyte | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| SCALA_VERSION: [ 2.13, 3.3 ] | |
| JAVA_VERSION: [ 17 ] | |
| if: github.repository == 'apache/pekko-persistence-r2dbc' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| - 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: Setup Java ${{ matrix.JAVA_VERSION }} | |
| uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0 | |
| with: | |
| distribution: temurin | |
| java-version: ${{ matrix.JAVA_VERSION }} | |
| - name: Install sbt | |
| uses: sbt/setup-sbt@a627500d27445f8c5021755a439829b6e78e3358 # v1.1.15 | |
| - name: Cache Coursier cache | |
| uses: coursier/cache-action@bebeeb0e6f48ebad66d3783946588ecf43114433 # 6.4.7 | |
| - name: Enable jvm-opts | |
| run: cp .jvmopts-ci .jvmopts | |
| - 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 | |
| docker exec -i yb-tserver-n1 /home/yugabyte/bin/ysqlsh -h yb-tserver-n1 -t -c 'CREATE DATABASE database1;' | |
| docker exec -i yb-tserver-n1 /home/yugabyte/bin/ysqlsh -h yb-tserver-n1 -t -d database1 < ddl-scripts/create_tables_yugabyte.sql | |
| docker exec -i yb-tserver-n1 /home/yugabyte/bin/ysqlsh -h yb-tserver-n1 -t -c 'CREATE DATABASE database2;' | |
| docker exec -i yb-tserver-n1 /home/yugabyte/bin/ysqlsh -h yb-tserver-n1 -t -d database2 < ddl-scripts/create_tables_yugabyte.sql | |
| - name: test | |
| run: sbt -Dpekko.persistence.r2dbc.dialect=yugabyte -Dpekko.projection.r2dbc.dialect=yugabyte ++${{ matrix.SCALA_VERSION }} test | |
| test-mysql: | |
| name: Run tests with MySQL | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| SCALA_VERSION: [ 2.13, 3.3 ] | |
| JAVA_VERSION: [ 17, 21 ] | |
| if: github.repository == 'apache/pekko-persistence-r2dbc' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| - 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: Setup Java ${{ matrix.JAVA_VERSION }} | |
| uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0 | |
| with: | |
| distribution: temurin | |
| java-version: ${{ matrix.JAVA_VERSION }} | |
| - name: Install sbt | |
| uses: sbt/setup-sbt@a627500d27445f8c5021755a439829b6e78e3358 # v1.1.15 | |
| - name: Cache Coursier cache | |
| uses: coursier/cache-action@bebeeb0e6f48ebad66d3783946588ecf43114433 # 6.4.7 | |
| - name: Enable jvm-opts | |
| run: cp .jvmopts-ci .jvmopts | |
| - name: Start DB | |
| run: |- | |
| docker compose -f docker/docker-compose-mysql.yml up -d --wait | |
| docker exec -i docker-mysql-db-1 mysql -h 127.0.0.1 --user=root --password=root --database=mysql < ddl-scripts/create_tables_mysql.sql | |
| docker exec -i docker-mysql-db-1 mysql -h 127.0.0.1 --user=root --password=root -e 'CREATE SCHEMA database1;' | |
| docker exec -i docker-mysql-db-1 mysql -h 127.0.0.1 --user=root --password=root --database=database1 < ddl-scripts/create_tables_mysql.sql | |
| docker exec -i docker-mysql-db-1 mysql -h 127.0.0.1 --user=root --password=root -e 'CREATE SCHEMA database2;' | |
| docker exec -i docker-mysql-db-1 mysql -h 127.0.0.1 --user=root --password=root --database=database2 < ddl-scripts/create_tables_mysql.sql | |
| - name: test | |
| run: sbt -Dpekko.persistence.r2dbc.dialect=mysql ++${{ matrix.SCALA_VERSION }} ${{ matrix.COMPILE_ONLY && 'Test/compile' || 'test' }} | |
| test-docs: | |
| name: Docs | |
| runs-on: ubuntu-latest | |
| if: github.repository == 'apache/pekko-persistence-r2dbc' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| - 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: Set up JDK 17 | |
| uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| - name: Install sbt | |
| uses: sbt/setup-sbt@a627500d27445f8c5021755a439829b6e78e3358 # v1.1.15 | |
| - name: Cache Coursier cache | |
| uses: coursier/cache-action@bebeeb0e6f48ebad66d3783946588ecf43114433 # 6.4.7 | |
| - name: Enable jvm-opts | |
| run: cp .jvmopts-ci .jvmopts | |
| - name: Compile docs | |
| run: |- | |
| sbt docs/paradox |