diff options
author | Vitaly Takmazov | 2022-12-14 13:34:19 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2022-12-14 16:18:06 +0300 |
commit | 560d89cb0285435f0e7c640b3fb67ab1197df808 (patch) | |
tree | 2e410bae3b5a4808c3efd16cf2a4875a68212c83 /.github | |
parent | 0c0ea8897e64461b1cfa9cd86a939b48f0bdd640 (diff) |
CI: matrix tests on profile strategy
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/ci.yml | 59 |
1 files changed, 40 insertions, 19 deletions
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 }} |