From cd0442ebdb08b8b0bd19cb0ad2a77c6660d5167f Mon Sep 17 00:00:00 2001 From: Kodai Doki Date: Wed, 9 Oct 2024 13:57:19 +0900 Subject: [PATCH 1/4] Add CI for sample Java applications --- .github/workflows/ci.yml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..10f4794f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,40 @@ +name: CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build-with-various-java-version: + strategy: + matrix: + version: [8, 11, 17, 21] + project: + - 'microservice-transaction-sample' + - 'multi-storage-transaction-sample' + - 'scalardb-kotlin-sample' + - 'scalardb-sample' + - 'scalardb-sql-jdbc-sample' + - 'spring-data-microservice-transaction-sample' + - 'spring-data-multi-storage-transaction-sample' + - 'spring-data-sample' + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK ${{ matrix.version }} + uses: actions/setup-java@v4 + with: + java-version: ${{ matrix.version }} + distribution: 'temurin' + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 + + - name: Build with Gradle Wrapper + working-directory: ${{ matrix.project }} + run: ./gradlew build \ No newline at end of file From d9d3cb6491dc5bfcfa0f92f45521d0aae42640ec Mon Sep 17 00:00:00 2001 From: Kodai Doki <52027276+KodaiD@users.noreply.github.com> Date: Wed, 9 Oct 2024 14:35:04 +0900 Subject: [PATCH 2/4] Add a new line at the end of the file Co-authored-by: kota2and3kan <47254383+kota2and3kan@users.noreply.github.com> --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 10f4794f..b48cfeba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,4 +37,4 @@ jobs: - name: Build with Gradle Wrapper working-directory: ${{ matrix.project }} - run: ./gradlew build \ No newline at end of file + run: ./gradlew build From 1e9078c3486fa3405b710712b6695bb715708b0c Mon Sep 17 00:00:00 2001 From: Kodai Doki <52027276+KodaiD@users.noreply.github.com> Date: Wed, 9 Oct 2024 14:42:06 +0900 Subject: [PATCH 3/4] Add workflow_dispatch to execute CI manually Co-authored-by: kota2and3kan <47254383+kota2and3kan@users.noreply.github.com> --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b48cfeba..390d39e9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,7 @@ on: branches: [ "main" ] pull_request: branches: [ "main" ] + workflow_dispatch: jobs: build-with-various-java-version: From 64797c426ad4dcec1b700773c727706c785933fb Mon Sep 17 00:00:00 2001 From: Kodai Doki <52027276+KodaiD@users.noreply.github.com> Date: Wed, 9 Oct 2024 14:49:22 +0900 Subject: [PATCH 4/4] Fix job name Co-authored-by: kota2and3kan <47254383+kota2and3kan@users.noreply.github.com> --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 390d39e9..20b272de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ on: workflow_dispatch: jobs: - build-with-various-java-version: + build-with-various-java-versions: strategy: matrix: version: [8, 11, 17, 21]