|
8 | 8 | workflow_dispatch: |
9 | 9 |
|
10 | 10 | jobs: |
11 | | - build-with-various-java-versions: |
12 | | - strategy: |
13 | | - matrix: |
14 | | - version: [8, 11, 17, 21] |
15 | | - project: |
16 | | - - 'microservice-transaction-sample' |
17 | | - - 'multi-storage-transaction-sample' |
18 | | - - 'scalardb-kotlin-sample' |
19 | | - - 'scalardb-sample' |
20 | | - - 'scalardb-sql-jdbc-sample' |
21 | | - - 'spring-data-microservice-transaction-sample' |
22 | | - - 'spring-data-multi-storage-transaction-sample' |
23 | | - - 'spring-data-sample' |
| 11 | +# build-with-various-java-versions: |
| 12 | +# strategy: |
| 13 | +# matrix: |
| 14 | +# version: [8, 11, 17, 21] |
| 15 | +# project: |
| 16 | +# - 'microservice-transaction-sample' |
| 17 | +# - 'multi-storage-transaction-sample' |
| 18 | +# - 'scalardb-kotlin-sample' |
| 19 | +# - 'scalardb-sample' |
| 20 | +# - 'scalardb-sql-jdbc-sample' |
| 21 | +# - 'spring-data-microservice-transaction-sample' |
| 22 | +# - 'spring-data-multi-storage-transaction-sample' |
| 23 | +# - 'spring-data-sample' |
| 24 | +# runs-on: ubuntu-latest |
| 25 | +# permissions: |
| 26 | +# contents: read |
| 27 | +# |
| 28 | +# steps: |
| 29 | +# - uses: actions/checkout@v4 |
| 30 | +# - name: Set up JDK ${{ matrix.version }} |
| 31 | +# uses: actions/setup-java@v4 |
| 32 | +# with: |
| 33 | +# java-version: ${{ matrix.version }} |
| 34 | +# distribution: 'temurin' |
| 35 | +# |
| 36 | +# - name: Setup Gradle |
| 37 | +# uses: gradle/actions/setup-gradle@v4 |
| 38 | +# |
| 39 | +# - name: Build with Gradle Wrapper |
| 40 | +# working-directory: ${{ matrix.project }} |
| 41 | +# run: ./gradlew build |
| 42 | + int-test: |
| 43 | +# defaults: |
| 44 | +# run: |
| 45 | +# working-directory: ./scalardb-sample |
24 | 46 | runs-on: ubuntu-latest |
25 | | - permissions: |
26 | | - contents: read |
27 | 47 |
|
28 | 48 | steps: |
29 | 49 | - uses: actions/checkout@v4 |
30 | | - - name: Set up JDK ${{ matrix.version }} |
31 | | - uses: actions/setup-java@v4 |
| 50 | +# working-directory: ${{GITHUB_WORKSPACE}} |
| 51 | + |
| 52 | + - name: Set up JDK 21 |
| 53 | + uses: actions/setup-java@v3 |
32 | 54 | with: |
33 | | - java-version: ${{ matrix.version }} |
| 55 | + java-version: 21 |
34 | 56 | distribution: 'temurin' |
35 | 57 |
|
36 | 58 | - name: Setup Gradle |
37 | | - uses: gradle/actions/setup-gradle@v4 |
| 59 | + uses: gradle/actions/setup-gradle@v3 |
| 60 | + |
| 61 | + - name: Start docker |
| 62 | + run: | |
| 63 | + docker compose up -d db2 |
| 64 | + docker ps |
| 65 | +
|
| 66 | + - name: Wait for the container to be ready |
| 67 | + timeout-minutes: 10 |
| 68 | + run: | |
| 69 | + while ! docker logs scalardb-sample-db2-1 2>&1 | grep -q "Setup has completed" |
| 70 | + do |
| 71 | + echo "Container is not yet ready" |
| 72 | + sleep 5s |
| 73 | + done |
| 74 | + echo "Container is ready" |
| 75 | +
|
| 76 | + - name: Download Schema Loader |
| 77 | + run: curl -L -o scalardb-data-loader-cli-3.16.0.jar https://github.com/scalar-labs/scalardb/releases/download/v3.16.0/scalardb-data-loader-cli-3.16.0.jar |
| 78 | + working-directory: ./scalardb-sample |
| 79 | + |
| 80 | + - name: Load initial data |
| 81 | + working-directory: ./scalardb-sample |
| 82 | + run: | |
| 83 | + java -jar scalardb-schema-loader-3.16.0.jar --config database.properties --schema-file schema.json --coordinator |
| 84 | +
|
| 85 | + - name: Run Gradlew commands |
| 86 | + working-directory: ./scalardb-sample |
| 87 | + run: | |
| 88 | + ./gradlew run --args="LoadInitialData" |
| 89 | + ./gradlew run --args="GetCustomerInfo 1" |
| 90 | + ./gradlew run --args="PlaceOrder 1 1:3,2:2" |
| 91 | + ./gradlew run --args="PlaceOrder 1 5:1" |
| 92 | + ./gradlew run --args="GetOrders 1" |
| 93 | + ./gradlew run --args="GetCustomerInfo 1" |
| 94 | + ./gradlew run --args="PlaceOrder 1 3:1,4:1" |
| 95 | + ./gradlew run --args="Repayment 1 8000" |
| 96 | + ./gradlew run --args="PlaceOrder 1 3:1,4:1" |
| 97 | + docker compose down |
| 98 | +
|
| 99 | + - name: Check docker logs |
| 100 | + if: always() |
| 101 | + run: docker logs |
38 | 102 |
|
39 | | - - name: Build with Gradle Wrapper |
40 | | - working-directory: ${{ matrix.project }} |
41 | | - run: ./gradlew build |
| 103 | + |
0 commit comments