From 560d89cb0285435f0e7c640b3fb67ab1197df808 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 14 Dec 2022 13:34:19 +0300 Subject: CI: matrix tests on profile strategy --- .github/workflows/ci.yml | 59 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 40 insertions(+), 19 deletions(-) (limited to '.github/workflows/ci.yml') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7c9166d9..3e4a1cdf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,29 +3,50 @@ name: Java CI on: pull_request: push: - branches: master + branches: [master] jobs: build: runs-on: ubuntu-20.04 + strategy: + matrix: + profile: [default, postgres, mysql] name: OpenJDK + services: + postgres: + image: postgres + ports: + - 5432:5432 + env: + POSTGRES_DB: juick + POSTGRES_USER: juick + POSTGRES_PASSWORD: secret + options: --health-cmd="pg_isready -U juick" --health-interval=10s --health-retries=3 --health-timeout=5s --health-start-period=15s + mysql: + image: mariadb + ports: + - 3306:3306 + env: + MARIADB_DATABASE: juick + MARIADB_ROOT_PASSWORD: secret + options: --health-cmd="mysqladmin ping" --health-interval=10s --health-retries=3 --health-timeout=5s --health-start-period=15s steps: - - uses: actions/checkout@v2 - - name: Set up JDK 19 - uses: actions/setup-java@v3 - with: - distribution: 'temurin' - java-version: 19 - cache: 'maven' - - name: Setup Node.JS 18 - uses: actions/setup-node@v3 - with: - node-version: '18' - cache: 'npm' - - run: npm install - - name: Run tests - run: mvn package - - uses: mikepenz/action-junit-report@v2 - with: - report_paths: '**/target/surefire-reports/TEST-*.xml' + - uses: actions/checkout@v2 + - name: Set up JDK 19 + uses: actions/setup-java@v3 + with: + distribution: "temurin" + java-version: 19 + cache: "maven" + - name: Setup Node.JS 18 + uses: actions/setup-node@v3 + with: + node-version: "18" + cache: "npm" + - run: npm install + - name: Run tests + run: mvn -P${{ matrix.profile }} clean package + - uses: mikepenz/action-junit-report@v2 + with: + report_paths: "**/target/surefire-reports/TEST-*.xml" github_token: ${{ secrets.GITHUB_TOKEN }} -- cgit v1.2.3