Skip to content

DBZ-8604 Add assembly profile to build dist package #19

DBZ-8604 Add assembly profile to build dist package

DBZ-8604 Add assembly profile to build dist package #19

name: Test Debezium platform (conductor)
on:
push:
paths:
- "debezium-platform-conductor/**"
branches:
- main
pull_request:
paths:
- "debezium-platform-conductor/**"
branches:
- main
jobs:
build_cache:
name: "Update Dependencies"
runs-on: ubuntu-latest
defaults:
run:
working-directory: debezium-platform-conductor
steps:
- name: Checkout core repository
uses: actions/checkout@v4
with:
repository: debezium/debezium
ref: main
path: debezium-platform-conductor/core
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
# GitHub actions seem to struggle returning actions/cache cache-hit
# Directly use the cache action here to control whether to fetch dependencies
- id: maven-cache-check
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: maven-debezium-test-build-${{ hashFiles('core/**/pom.xml') }}
# Caches should be restored based on a logical order to minimize the build and test
# execution time. Here the logic is as follows:
# 1. Restore this PR's cache if the PR has previously been built
# 2. Restore the latest main cache if the core pom has not changed
# 3. Restore the latest main cache available
# This should minimize the download time required for updating dependencies
restore-keys: |
maven-debezium-test-build-${{ hashFiles('core/**/pom.xml') }}
maven-debezium-test-push-build-${{ hashFiles('core/**/pom.xml') }}
maven-debezium-test-push-build-
- name: Maven build core dependencies
run: >
./core/mvnw clean install -f core/pom.xml
-DskipTests
-DskipITs
-Dformat.formatter.goal=validate
-Dformat.imports.goal=check
-Dhttp.keepAlive=false
-Dmaven.wagon.http.pool=false
-Dmaven.wagon.httpconnectionManager.ttlSeconds=120
-Dmaven.javadoc.skip=true
-Dstyle.color=always
--no-transfer-progress
-T4
check_style:
name: "Checkstyle and Formatting"
needs: [ build_cache ]
runs-on: ubuntu-latest
defaults:
run:
working-directory: debezium-platform-conductor
steps:
- name: Checkout Action
uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Cache Maven Repository
id: cache-check
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: maven-debezium-test-build-${{ hashFiles('core/**/pom.xml') }}
restore-keys: maven-debezium-test-build-${{ hashFiles('core/**/pom.xml') }}
- name: "Checkstyle, Formatting, and Import Order Checks"
run: >
./mvnw -B -ntp process-sources checkstyle:checkstyle
-Dformat.formatter.goal=validate
-Dformat.imports.goal=check
-Dorg.slf4j.simpleLogger.showDateTime=true
-Dorg.slf4j.simpleLogger.dateTimeFormat="YYYY-MM-dd HH:mm:ss,SSS"
tests:
name: "Run tests"
needs: [ check_style]
runs-on: ubuntu-latest
defaults:
run:
working-directory: debezium-platform-conductor
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Cache Maven Repository
id: cache-check
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: maven-debezium-test-build-${{ hashFiles('core/**/pom.xml') }}
restore-keys: maven-debezium-test-build-${{ hashFiles('core/**/pom.xml') }}
- name: Run tests
run: ./mvnw clean verify