mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-23 16:25:49 +00:00
configuring pipelines for pull requests
This commit is contained in:
parent
f6f17ab3f4
commit
f624b6343f
2 changed files with 45 additions and 30 deletions
44
.github/workflows/code-quality.yml
vendored
Normal file
44
.github/workflows/code-quality.yml
vendored
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
# 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://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
|
||||||
|
|
||||||
|
name: Code Quality for Pull Requests
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
verify:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
java: [ '17' ]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Set up JDK ${{matrix.java}}
|
||||||
|
uses: actions/setup-java@v3
|
||||||
|
with:
|
||||||
|
java-version: ${{matrix.java}}
|
||||||
|
distribution: 'adopt'
|
||||||
|
cache: maven
|
||||||
|
- name: Build with Maven Wrapper
|
||||||
|
run: ./mvnw -B verify
|
||||||
|
qodana:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
pull-requests: write
|
||||||
|
checks: write
|
||||||
|
needs: verify
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
|
pr-mode: true
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: 'Qodana Scan'
|
||||||
|
uses: JetBrains/qodana-action@v2023.2
|
||||||
|
# env:
|
||||||
|
# QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
|
||||||
|
|
31
.github/workflows/maven-build.yml
vendored
31
.github/workflows/maven-build.yml
vendored
|
@ -6,8 +6,6 @@ name: Java CI with Maven
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ main ]
|
branches: [ main ]
|
||||||
pull_request:
|
|
||||||
branches: [ main ]
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
verify:
|
verify:
|
||||||
|
@ -24,31 +22,4 @@ jobs:
|
||||||
distribution: 'adopt'
|
distribution: 'adopt'
|
||||||
cache: maven
|
cache: maven
|
||||||
- name: Build with Maven Wrapper
|
- name: Build with Maven Wrapper
|
||||||
run: ./mvnw -B verify
|
run: ./mvnw -B package
|
||||||
qodana:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: verify
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- name: 'Qodana Scan'
|
|
||||||
uses: JetBrains/qodana-action@v2023.2
|
|
||||||
# env:
|
|
||||||
# QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: qodana
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
java: [ '17' ]
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Set up JDK ${{matrix.java}}
|
|
||||||
uses: actions/setup-java@v2
|
|
||||||
with:
|
|
||||||
java-version: ${{matrix.java}}
|
|
||||||
distribution: 'adopt'
|
|
||||||
cache: maven
|
|
||||||
- name: Build with Maven Wrapper
|
|
||||||
run: ./mvnw -B verify
|
|
||||||
|
|
Loading…
Reference in a new issue