Skip to content

PIMOB-2183: Add github actions for linting and unit testing #14

PIMOB-2183: Add github actions for linting and unit testing

PIMOB-2183: Add github actions for linting and unit testing #14

name: Send SonarQube Report
on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
types: [ opened, synchronize, reopened ]
branches: [ master, "bugfix/*", "feature/*", "release/*" ]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build Jacoco Test Report for :checkout
runs-on: ubuntu-latest
permissions:
pull-requests: read
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
distribution: corretto
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Cache Gradle and wrapper
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
- name: Build Jacoco Test Report for :checkout
run: ./gradlew :checkout:jacocoTestReport
- name: Build Jacoco Test Report for :frames
run: ./gradlew :frames:jacocoTestReport
- name: Send SonarQube Report
run: echo "TODO integrate with SonarCloud"
# uses: sonarsource/[email protected]
# env:
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}