Skip to content

fix(deps): update all dependencies #88

fix(deps): update all dependencies

fix(deps): update all dependencies #88

Workflow file for this run

name: RNM
on:
pull_request:
push:
branches:
- main
tags:
- v*
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
TZ: America/Sao_Paulo
jobs:
cancel-stale-jobs:
name: Cancel stale jobs
runs-on: ubuntu-latest
steps:
- name: Cancel Stale Jobs
uses: styfle/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
validation:
name: Validation
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
assemble:
name: Assembling
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Common Steps
uses: ./.github/actions/common-steps
- name: Assemble RNM
run: ./gradlew assembleDebug --no-daemon --scan
- name: Upload compose reports artifact
uses: actions/upload-artifact@v3
if: always()
with:
name: compose-reports
path: |
**/build/compose-metrics
**/build/compose-reports
retention-days: 2
static-analysis:
name: Static analysis
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Common Steps
uses: ./.github/actions/common-steps
- name: Run detekt
run: ./gradlew detekt ktlintCheck --no-daemon
- name: Upload static reports artifact
uses: actions/upload-artifact@v3
with:
name: static-report
path: |
build/reports/detekt/detekt.xml
**/build/reports/ktlint/ktlintKotlinScriptCheck/ktlintKotlinScriptCheck.txt
retention-days: 1
- name: Analyze detekt report
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: app/build/reports/detekt/detekt.sarif
checkout_path: ${{ github.workspace }}
unit-tests:
name: Unit testing
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Common Steps
uses: ./.github/actions/common-steps
- name: Run unit tests
run: ./gradlew testDebugUnitTest koverXmlReportDebug --no-daemon --scan
- name: Upload tests reports artifact (success)
uses: actions/upload-artifact@v3
if: success()
with:
name: tests-reports
path: app/build/reports/tests
retention-days: 2
- name: Upload tests reports artifact (failure)
uses: actions/upload-artifact@v3
if: failure()
with:
name: tests-reports
path: |
**/build/reports/tests/test
**/build/reports/tests/testDebugUnitTest
retention-days: 2
- name: Upload coverage reports artifact
uses: actions/upload-artifact@v3
with:
name: coverage-reports
path: '**/build/reports/kover/reportDebug.xml'
retention-days: 1
- name: Upload report to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: '**/build/reports/kover/reportDebug.xml'
flags: unittests
verbose: true
sonar:
name: SonarQube
runs-on: ubuntu-latest
needs: [ static-analysis, unit-tests ]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Common Steps
uses: ./.github/actions/common-steps
- name: Cache SonarCloud packages
uses: actions/cache@v3
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Download static report artifacts
uses: actions/download-artifact@v3
with:
name: static-report
path: .
- name: Download coverage artifact
uses: actions/download-artifact@v3
with:
name: coverage-reports
path: .
- name: Run SonarQube
if: github.event_name != 'pull_request'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./gradlew sonar --no-daemon
- name: Run SonarQube in PR
if: github.event_name == 'pull_request'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./gradlew sonar -Dsonar.pullrequest.branch=${{ github.event.pull_request.head.ref }} -Dsonar.pullrequest.base=${{ github.event.pull_request.base.ref }} -Dsonar.pullrequest.key=${{ github.event.pull_request.number }} --no-daemon