Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #2183 from Netflix/sonar
Browse files Browse the repository at this point in the history
Adds sonar to PR builds
  • Loading branch information
apanicker-nflx authored Apr 16, 2021
2 parents 664754e + a26815b commit 5d874b8
Show file tree
Hide file tree
Showing 22 changed files with 39,432 additions and 2,716 deletions.
19 changes: 14 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,41 @@ jobs:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Gradle wrapper validation
uses: gradle/wrapper-validation-action@v1
- name: Set up Zulu JDK 11
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
- name: Cache SonarCloud packages
uses: actions/cache@v2
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
restore-keys: ${{ runner.os }}-gradle-
- name: Build with Gradle
if: github.ref != 'refs/heads/main'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
echo "Running build for commit ${{ github.sha }} in ${{ github.head_ref }}"
./gradlew build --scan
./gradlew build sonarqube --scan
- name: Build and Publish snapshot
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
run: |
echo "Running build for commit ${{ github.sha }}"
./gradlew build snapshot --scan
echo "Running build for commit ${{ github.sha }}"
./gradlew build snapshot --scan
env:
NETFLIX_OSS_SIGNING_KEY: ${{ secrets.ORG_SIGNING_KEY }}
NETFLIX_OSS_SIGNING_PASSWORD: ${{ secrets.ORG_SIGNING_PASSWORD }}
Expand Down
Loading

0 comments on commit 5d874b8

Please sign in to comment.