mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
CI: add a workflow for CI (#5483)
* Create SECURITY.md * CI: Create maven.yml * Update maven.yml * Update maven.yml * fix bugs of fastsql schema test
This commit is contained in:
46
.github/workflows/maven.yml
vendored
Normal file
46
.github/workflows/maven.yml
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
|
||||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
|
||||
|
||||
# This workflow uses actions that are not certified by GitHub.
|
||||
# They are provided by a third-party and are governed by
|
||||
# separate terms of service, privacy policy, and support
|
||||
# documentation.
|
||||
|
||||
name: Java CI with Maven
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
pull_request:
|
||||
branches: [ "master" ]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ${{ matrix.os }}
|
||||
permissions:
|
||||
contents: read
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ ubuntu-latest ]
|
||||
java: [ 8, 11, 17, 21 ]
|
||||
fail-fast: false
|
||||
max-parallel: 16
|
||||
name: Test JDK ${{ matrix.java }}, ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- name: Set up JDK
|
||||
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: ${{ matrix.java }}
|
||||
cache: 'maven'
|
||||
- name: Build with Maven if test jdk8
|
||||
if: ${{ matrix.java == '8' || matrix.java == '11'}}
|
||||
run: ./mvnw -Pgen-javadoc clean package -B
|
||||
- name: Build with Maven if test jdk17
|
||||
if: ${{ matrix.java == '17' || matrix.java == '21' }}
|
||||
run: ./mvnw -Penable-for-jdk17+,gen-code-cov clean package -B
|
||||
Reference in New Issue
Block a user