From 68f848fb14df3cd91a9c00c24915fae069fc84f7 Mon Sep 17 00:00:00 2001 From: Dai MIKURUBE Date: Fri, 12 Jul 2024 13:08:53 +0900 Subject: [PATCH] Add the PostgreSQL service, and matrix for Java and PostgreSQL --- .github/workflows/input-postgresql.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/input-postgresql.yml b/.github/workflows/input-postgresql.yml index 5abee6d..80e6ccd 100644 --- a/.github/workflows/input-postgresql.yml +++ b/.github/workflows/input-postgresql.yml @@ -6,10 +6,20 @@ on: - cron: "0 18 * * *" # 3am in Asia/Tokyo jobs: input-with-postgresql: - runs-on: ubuntu-latest # push: always run. # pull_request: run only when the PR is submitted from a forked repository, not within this repository. if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository + runs-on: ubuntu-latest + strategy: + java: [ 8, 11, 17, 21 ] + postgres: [ "postgres:12", "postgres:13", "postgres:14", "postgres:15", "postgres:16" ] + services: + postgres: + image: ${{ matrix.postgres }} + ports: + - "5432:5432" + env: + POSTGRES_PASSWORD: postgres strategy: fail-fast: false steps: @@ -18,7 +28,7 @@ jobs: - name: Set up OpenJDK 8 uses: actions/setup-java@v4 with: - java-version: 8 + java-version: ${{ matrix.java }} distribution: "temurin" - name: Download Embulk