From 90bf5749014a62ffac230f2e6d813351056dc44a Mon Sep 17 00:00:00 2001 From: Chris Jackson Date: Fri, 5 May 2023 21:38:47 +0100 Subject: [PATCH] Create errorprone.yml --- .github/workflows/codeql.yml | 16 ++++++++++------ .github/workflows/errorprone.yml | 30 ++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/errorprone.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 87346a187..401a810a6 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -1,12 +1,12 @@ -name: "CodeQL" +name: 'CodeQL' on: push: - branches: [ "master" ] + branches: ['master'] pull_request: - branches: [ "master" ] + branches: ['master'] schedule: - - cron: "47 12 * * 4" + - cron: '47 12 * * 4' jobs: analyze: @@ -20,11 +20,15 @@ jobs: strategy: fail-fast: false matrix: - language: [ java ] + language: [java] steps: - name: Checkout uses: actions/checkout@v3 + with: + java-version: '11' + distribution: 'temurin' + cache: maven - name: Initialize CodeQL uses: github/codeql-action/init@v2 @@ -38,4 +42,4 @@ jobs: - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v2 with: - category: "/language:${{ matrix.language }}" + category: '/language:${{ matrix.language }}' diff --git a/.github/workflows/errorprone.yml b/.github/workflows/errorprone.yml new file mode 100644 index 000000000..d167eba79 --- /dev/null +++ b/.github/workflows/errorprone.yml @@ -0,0 +1,30 @@ +# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Error Prone Check + +on: + push: + branches: ['master'] + pull_request: + branches: ['master'] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + cache: maven + - name: Build with Maven + run: mvn -P error-prone-check clean compile --file pom.xml