Merge branch 'refresh-versions' into s04e03 #43
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: Push to dev branch | |
on: | |
push: | |
branches-ignore: | |
- master | |
paths-ignore: | |
- '.github/badges/**' | |
- '.idea/**' | |
- '**/*.md' | |
- '.github/workflows/merge**' | |
- '.github/workflows/**master**' | |
- '.github/workflows/nigthly**' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
NVD_APIKEY_CPM: ${{ secrets.NVD_APIKEY_CPM }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: Cache Gradle packages | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' # See 'Supported distributions' for available options | |
java-version: '17' | |
- name: Expose git commit data | |
uses: rlespinasse/[email protected] | |
- name: Prepare Gradle | |
run: | | |
chmod +x ./gradlew | |
./gradlew clean | |
- name: Check dependencies for vulnerabilities | |
run: | | |
./gradlew dependencyCheckAnalyze | |
- name: Build with Gradle | |
run: | | |
./gradlew build | |
- name: Push changes back to origin | |
run: | | |
git push origin --tags | |
git push origin --all --force | |
- name: Upload Test Reports | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-reports | |
path: build/reports/tests | |
- name: Visualize Sources | |
uses: githubocto/repo-visualizer@main | |
with: | |
excluded_paths: "ignore,.github" | |
- name: Generate Jacoco Badge | |
id: jacoco | |
uses: cicirello/jacoco-badge-generator@v2 | |
with: | |
jacoco-csv-file: build/reports/jacoco/jacoco.csv | |
- name: Commit JaCoCo badge | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: Apply CI initiated changes | |
file_pattern: .github/badges/* | |
- name: Log coverage percentage | |
run: | | |
echo "coverage = ${{ steps.jacoco.outputs.coverage }}" | |
- name: Upload Jacoco coverage report | |
uses: actions/upload-artifact@v4 | |
with: | |
name: jacoco-report | |
path: build/reports/jacoco | |