Skip to content

Commit

Permalink
Fix spotbugs (#1259)
Browse files Browse the repository at this point in the history
  • Loading branch information
meiao authored May 10, 2023
1 parent 48a691c commit 7890907
Showing 1 changed file with 10 additions and 33 deletions.
43 changes: 10 additions & 33 deletions .github/workflows/GHA-Spotbugs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,45 +21,22 @@ jobs:
with:
ref: ${{ inputs.agent-ref || github.ref || 'main' }}

- name: Set up Java 8
uses: actions/setup-java@v3
- name: Configure AWS Credentials
if: ${{ env.AWS_KEY != '' }}
uses: aws-actions/configure-aws-credentials@v1-node16
with:
distribution: 'temurin'
java-version: 8
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-2

- name: Save JAVA_HOME as JDK8 env variables
run: |
echo "Current JAVA_HOME = ${JAVA_HOME}"
echo "ORG_GRADLE_PROJECT_jdk8=$JAVA_HOME" >> $GITHUB_ENV
- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: setup gradle options
run: echo "GRADLE_OPTIONS=-Porg.gradle.java.installations.auto-detect=false -Porg.gradle.java.installations.fromEnv=ORG_GRADLE_PROJECT_jdk8" >> $GITHUB_ENV

- name: set gradle.properties
run: |
sed -i -e "s|jdk8=8|jdk8=${JDK8}|" gradle.properties.gha
mv gradle.properties.gha gradle.properties
- name: Check environmental variables
run: printenv | sort -f
- name: Setup environment
uses: ./.github/actions/setup-environment

- name: Build newrelicJar
env:
JAVA_HOME: ${{ env.ORG_GRADLE_PROJECT_jdk8 }}
run: |
ls -la
cat settings.gradle
./gradlew $GRADLE_OPTIONS clean jar --parallel
ls -la newrelic-agent/build/
run: ./gradlew $GRADLE_OPTIONS clean jar

- name: Execute Spotbugs
env:
JAVA_HOME: ${{ env.ORG_GRADLE_PROJECT_jdk8 }}
run: |
./gradlew $GRADLE_OPTIONS spotbugsMain --parallel
run: ./gradlew $GRADLE_OPTIONS spotbugsMain

- uses: actions/upload-artifact@v3
with:
Expand Down

0 comments on commit 7890907

Please sign in to comment.