|
|
|
name: check
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- 'api/**'
|
|
|
|
- 'common/**'
|
|
|
|
- 'core/**'
|
|
|
|
- 'dao/**'
|
|
|
|
- 'plugin/**'
|
|
|
|
- 'gradle/**'
|
|
|
|
- 'config/**'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
checkstyle:
|
|
|
|
name: Checkstyle
|
|
|
|
runs-on: ubuntu-18.04
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: reviewdog/action-setup@v1
|
|
|
|
with:
|
|
|
|
reviewdog_version: latest
|
|
|
|
- name: download checkstyle
|
|
|
|
run: curl -o checkstyle.jar -L https://github.com/checkstyle/checkstyle/releases/download/checkstyle-9.3/checkstyle-9.3-all.jar
|
|
|
|
- name: checkstyle
|
|
|
|
env:
|
|
|
|
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
run: java -jar checkstyle.jar -c config/checkstyle/checkstyle.xml -f xml . | reviewdog -f=checkstyle -name="Checkstyle Report" -reporter="github-check" -fail-on-error=true -level="error" -filter-mode=nofilter
|
|
|
|
|
|
|
|
mysql-integration-test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
services:
|
|
|
|
mysql:
|
|
|
|
image: mysql:5.7
|
|
|
|
ports:
|
|
|
|
- 3306:3306
|
|
|
|
env:
|
|
|
|
MYSQL_ROOT_PASSWORD: "123456"
|
|
|
|
MYSQL_DATABASE: databasir
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Set up JDK 11
|
|
|
|
uses: actions/setup-java@v2
|
|
|
|
with:
|
|
|
|
distribution: 'temurin'
|
|
|
|
java-version: '11'
|
|
|
|
cache: 'gradle'
|
|
|
|
|
|
|
|
- name: Gradle Permission Grant
|
|
|
|
run: chmod +x ./gradlew
|
|
|
|
|
|
|
|
- name: Gradle Test
|
|
|
|
run: ./gradlew api:check core:check
|
|
|
|
|
|
|
|
- name: Publish Test Report
|
|
|
|
uses: mikepenz/action-junit-report@v3
|
|
|
|
if: always()
|
|
|
|
with:
|
|
|
|
report_paths: '**/build/test-results/test/TEST-*.xml'
|