Skip to content

Merge pull request #112 from CleverTap/force_tls #81

Merge pull request #112 from CleverTap/force_tls

Merge pull request #112 from CleverTap/force_tls #81

Workflow file for this run

# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Test, and report to SonarCloud
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Cache local Sonar cache
uses: actions/cache@v2
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar-${{ hashFiles('**/*.jar') }}
restore-keys: |
${{ runner.os }}-sonar-
- name: Run tests
run: mvn -B -P jacoco verify
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Report to SonarCloud
run: mvn -B org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}