Skip to content

提取 BeanSerializerModifierHelper #748

提取 BeanSerializerModifierHelper

提取 BeanSerializerModifierHelper #748

Workflow file for this run

# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: ci
on:
push:
branches: [ ]
pull_request:
branches: [ ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
# 设置 Maven Settings
- name: maven-settings-xml-action
uses: whelk-io/maven-settings-xml-action@v21
with:
profiles: >
[
{
"id": "ci",
"properties": {
"altSnapshotDeploymentRepository": "${{ secrets.ALT_SNAPSHOT_DEPLOYMENT_REPOSITORY }}",
"altReleaseDeploymentRepository": "${{ secrets.ALT_RELEASE_DEPLOYMENT_REPOSITORY }}"
}
}
]
servers: >
[
{
"id": "ossrh",
"username": "${{ secrets.MVN_SERVER_USER }}",
"password": "${{ secrets.MVN_SERVER_PASSWORD }}"
}
]
repositories: >
[
{
"id": "ossrh-releases",
"name": "ossrh releases",
"url": "https://s01.oss.sonatype.org/content/repositories/releases/",
"releases": {
"enabled": "true",
"updatePolicy": "always"
},
"snapshots": {
"enabled": "false",
"updatePolicy": "always"
}
},
{
"id": "ossrh-snapshots",
"name": "ossrh snapshots",
"url": "https://s01.oss.sonatype.org/content/repositories/snapshots/",
"releases": {
"enabled": "false",
"updatePolicy": "always"
},
"snapshots": {
"enabled": "true",
"updatePolicy": "always"
}
}
]
- name: Clean Maven Repository
run: rm -rf /home/runner/.m2/repository
- name: Cat Setting.xml
run: cat /home/runner/.m2/settings.xml
- name: Build with Maven
run: mvn -U -B package -Pgithub,ci --file pom.xml
- name: Deploy with Maven
run: mvn -B deploy -Pgithub,ci --file pom.xml
- name: Codecov
uses: codecov/codecov-action@v3
- name: Cache SonarCloud packages
uses: actions/cache@v1
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Maven packages
uses: actions/cache@v1
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: mvn -B verify -Pci org.sonarsource.scanner.maven:sonar-maven-plugin:sonar