tet123/.github/workflows/mongodb-workflow.yml

66 lines
2.3 KiB
YAML
Raw Normal View History

2020-11-06 12:26:33 +01:00
name: Build MongoDB Connector
on:
push:
branches:
- main
- 1.*
2020-11-06 12:26:33 +01:00
paths:
- 'support/checkstyle/**'
- 'debezium-api/**'
- 'debezium-assembly-descriptors/**'
- 'debezium-core/**'
- 'debezium-embedded/**'
- 'debezium-connector-mongodb/**'
- 'debezium-parent/pom.xml'
2021-03-16 10:22:00 +01:00
- 'debezium-bom/pom.xml'
- 'pom.xml'
- '.github/workflows/mongodb-workflow.yml'
2020-11-06 12:26:33 +01:00
pull_request:
branches:
- main
- 1.*
2020-11-06 12:26:33 +01:00
paths:
- 'support/checkstyle/**'
- 'debezium-api/**'
- 'debezium-assembly-descriptors/**'
- 'debezium-core/**'
- 'debezium-embedded/**'
- 'debezium-connector-mongodb/**'
- 'debezium-parent/pom.xml'
2021-03-16 10:22:00 +01:00
- 'debezium-bom/pom.xml'
- 'pom.xml'
- '.github/workflows/mongodb-workflow.yml'
2020-11-06 12:26:33 +01:00
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
2021-11-22 11:51:43 +01:00
version-mongo-server: ["4.0", "4.4", "5.0"]
2020-11-06 12:26:33 +01:00
steps:
- name: Checkout Action
uses: actions/checkout@v2
- name: Get Date
id: get-date
run: |
echo "::set-output name=date::$(/bin/date -u "+%Y-%m")"
shell: bash
- name: Set up Java 17
2021-10-08 07:48:59 +02:00
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: 17
- name: Cache Maven Repository
2020-11-06 12:26:33 +01:00
uses: actions/cache@v2
with:
path: ~/.m2/repository
# refresh cache every month to avoid unlimited growth
key: maven-mongo-${{ matrix.version-mongo-server }}-${{ steps.get-date.outputs.date }}
2020-11-06 12:26:33 +01:00
restore-keys: |
maven-mongo-${{ matrix.version-mongo-server }}-${{ steps.get-date.outputs.date }}
- name: Run Formatting and Import Order Checks
run: mvn clean install -DskipTests=true -DskipITs=true -Dformat.formatter.goal=validate -Dformat.imports.goal=check -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120
- name: Build Debezium Connector MongoDB
run: mvn clean install -B -pl debezium-connector-mongodb -am -Passembly -Dcheckstyle.skip=true -Dformat.skip=true -Drevapi.skip -Dversion.mongo.server=${{ matrix.version-mongo-server }} -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120