Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Code formatting check post Pull-Request (#3349) #4028

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/knative-java-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@

steps:
- name: Check out code
uses: actions/checkout@v2

Check failure on line 38 in .github/workflows/knative-java-test.yaml

View workflow job for this annotation

GitHub Actions / style / suggester / github_actions

[actionlint] reported by reviewdog 🐶 the runner of "actions/checkout@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue [action] Raw Output: .github/workflows/knative-java-test.yaml:38:15: the runner of "actions/checkout@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue [action]

- name: Setup java
uses: actions/setup-java@v2

Check failure on line 41 in .github/workflows/knative-java-test.yaml

View workflow job for this annotation

GitHub Actions / style / suggester / github_actions

[actionlint] reported by reviewdog 🐶 the runner of "actions/setup-java@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue [action] Raw Output: .github/workflows/knative-java-test.yaml:41:15: the runner of "actions/setup-java@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue [action]
with:
cache: 'maven'
java-version: ${{ matrix.java-version }}
Expand All @@ -53,9 +53,12 @@
- name: Java Test
run: ./hack/run.sh unit-tests-data-plane

- name: Code Formatting Check
run: ./hack/run.sh format-check

- if: steps.codecov-enabled.outputs.files_exists == 'true'
name: Codecov
uses: codecov/codecov-action@v1

Check failure on line 61 in .github/workflows/knative-java-test.yaml

View workflow job for this annotation

GitHub Actions / style / suggester / github_actions

[actionlint] reported by reviewdog 🐶 the runner of "codecov/codecov-action@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue [action] Raw Output: .github/workflows/knative-java-test.yaml:61:15: the runner of "codecov/codecov-action@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue [action]
with:
file: ./data-plane/target/jacoco/jacoco.xml
flags: java-unittests
3 changes: 3 additions & 0 deletions hack/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ elif [[ "${action}" == "integration-test" ]]; then
elif [[ "${action}" == "format-java" ]]; then
cd "${ROOT_DIR}/data-plane"
./mvnw spotless:apply
elif [[ "${action}" == "format-check" ]]; then
cd "${ROOT_DIR}/data-plane"
./mvnw spotless:check
else
echo "Unrecognized action ${action}"
usage "$0"
Expand Down
Loading