From c3caf0704f25a0c365f1c315e804a30b87c62a75 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Mon, 17 Aug 2020 14:29:16 -0700 Subject: [PATCH] chore(java_templates): add lint/static analysis presubmit checks for samples (#727) * chore(java_templates): add lint/static analysis presubmit checks for samples * chore: fix trailing whitespace --- .../.github/workflows/samples.yaml | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 synthtool/gcp/templates/java_library/.github/workflows/samples.yaml diff --git a/synthtool/gcp/templates/java_library/.github/workflows/samples.yaml b/synthtool/gcp/templates/java_library/.github/workflows/samples.yaml new file mode 100644 index 000000000..34bf860f6 --- /dev/null +++ b/synthtool/gcp/templates/java_library/.github/workflows/samples.yaml @@ -0,0 +1,24 @@ +on: + pull_request: +name: samples +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - name: Run checkstyle + run: mvn -P lint --quiet --batch-mode checkstyle:check + working-directory: samples/snippets + static: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - name: Run PMD & Spotbugs + run: mvn -P lint --quiet --batch-mode compile pmd:cpd-check spotbugs:check + working-directory: samples/snippets