Merge pull request #7 from allisonjoycarter/develop #49
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: "Quality Checks" | |
on: | |
push: | |
branches: | |
- "*" | |
tags: | |
- "*" | |
# - '!badges' | |
workflow_call: | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
env: | |
GRADLE_OPTS: -Dorg.gradle.daemon=false | |
steps: | |
- name: Checkout Branch | |
uses: actions/checkout@v4 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
cache: 'gradle' | |
- name: Run Detekt | |
run: "./gradlew detekt" | |
# lint-badge: | |
# needs: lint | |
# if: github.ref == 'refs/head/main' | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Extract detekt values | |
# id: smells | |
# run: grep -oP '\d+(?= number of total code smells)' build/reports/detekt/detekt.md | sed 's/^/smells=/' >> "${GITHUB_OUTPUT}" | |
# | |
# # Create the directory where badges will be saved, if needed | |
# - name: Create destination directory | |
# run: mkdir -p "main" | |
# | |
# # Use the output from the `coverage` step | |
# - name: Generate the badge SVG image | |
# uses: emibcn/[email protected] | |
# id: badge | |
# with: | |
# label: 'Detekt' | |
# status: ${{ steps.smells.outputs.smells }} | |
# color: 'blue,555,daf' | |
# path: main/smells-badge.svg | |
# | |
# - name: Upload badge as artifact | |
# uses: actions/upload-artifact@v4 | |
# with: | |
# name: badge | |
# path: main/smells-badge.svg | |
# if-no-files-found: error | |
# | |
# - name: Commit badge | |
# continue-on-error: true | |
# run: | | |
# git config --local user.email "[email protected]" | |
# git config --local user.name "GitHub Action" | |
# git add "main/smells-badge.svg" | |
# git commit -m "Add/Update badge" | |
# | |
# - name: Push badge commit | |
# uses: ad-m/github-push-action@master | |
# if: ${{ success() }} | |
# with: | |
# github_token: ${{ secrets.GITHUB_TOKEN }} | |
# branch: main |