refactor(analyzer): extract method #460
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Development | |
on: | |
push: | |
branches: | |
- main | |
- master | |
paths-ignore: | |
- '*.md' | |
- 'docs/**' | |
- '.gitignore' | |
jobs: | |
build: | |
if: ${{ github.repository_owner == 'schemaspy' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: 17 | |
cache: 'maven' | |
server-id: ossrh | |
server-username: OSSRH_USERNAME | |
server-password: OSSRH_PASSWORD | |
- name: Install Graphviz | |
run: sudo apt-get install graphviz | |
- name: Cache SonarCloud packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/.sonar/cache | |
key: ${{ runner.os }}-sonar | |
restore-keys: ${{ runner.os }}-sonar | |
- name: Build, Test, Sonar, Deploy | |
run: > | |
./mvnw | |
--batch-mode | |
--update-snapshots | |
--errors | |
--show-version | |
-P coverage | |
-P sonar | |
-P release | |
clean | |
deploy | |
-Dscm.revision=$GITHUB_SHA | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | |
- name: Upload test output | |
uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: testout | |
path: | | |
target/testout/ | |
!target/testout/**/bower/ | |
!target/testout/**/fonts/ | |
!target/testout/**/*.js | |
retention-days: 7 | |
- name: Create latest.json | |
if: success() | |
run: | | |
SCHEMASPY_VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout) | |
mkdir gh-pages | |
cp .github/pages/* gh-pages/ | |
cp target/schemaspy-*-app.jar gh-pages/schemaspy-${SCHEMASPY_VERSION}.jar | |
echo "{\"version\": \"${SCHEMASPY_VERSION}\", \"filename\": \"schemaspy-${SCHEMASPY_VERSION}.jar\"}" >> gh-pages/latest.json | |
- name: Deploy to gh-pages | |
if: success() | |
uses: crazy-max/ghaction-github-pages@c0d7ff0487ee0415efb7f32dab10ea880330b1dd | |
with: | |
target_branch: gh-pages | |
build_dir: gh-pages | |
jekyll: false | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Set up QEMU (Docker) | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Docker Buildx Bake(Temurin-snapshot) | |
uses: docker/bake-action@v4 | |
with: | |
files: docker-bake.hcl | |
push: true | |
targets: snapshot |