Skip to content

Update backend-ci.yml #21

Update backend-ci.yml

Update backend-ci.yml #21

Workflow file for this run

name: backend-ci
on:
push:
branches: [ "main" ]
paths:
- "demo/**"
- ".github/workflows/actions/action.yaml"
- ".github/workflows/backend-ci.yml"
- "pom.xml"
pull_request:
branches: [ "main" ]
paths:
- "demo/**"
- ".github/workflows/actions/action.yaml"
- ".github/workflows/backend-ci.yml"
- "pom.xml"
workflow_dispatch:
jobs:
Build:
runs-on: ubuntu-latest
env:
FROM_ORIGINAL_REPOSITORY: ${{ github.event.pull_request.head.repo.full_name == github.repository || github.ref == 'refs/heads/main' }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- uses: ./.github/workflows/actions
- name: Run Maven Build Command
run: mvn clean install -DskipTests -pl demo -am
- name: Run Maven Checkstyle
run: mvn checkstyle:checkstyle -pl demo -am
- uses: jwgmeligmeyling/checkstyle-github-action@master
with:
path: '**/checkstyle-result.xml'
- name: OWASP Dependency Check
uses: dependency-check/Dependency-Check_Action@main
env:
JAVA_HOME: /opt/jdk
with:
project: 'spring-elastic-redis'
path: '.'
format: 'HTML'
- name: Upload OWASP Dependency Check results
uses: actions/upload-artifact@master
with:
name: OWASP Dependency Check Report
path: ${{github.workspace}}/reports
- name: Add coverage report to PR
uses: madrapps/[email protected]
if: ${{ env.FROM_ORIGINAL_REPOSITORY == 'true' }}
with:
paths: ${{github.workspace}}/demo/target/site/jacoco/jacoco.xml
token: ${{secrets.GITHUB_TOKEN}}
min-coverage-overall: 80
min-coverage-changed-files: 60
title: 'Demo Coverage Report'
update-comment: true