Skip to content

Commit

Permalink
Run precommit before gradle check (#5066)
Browse files Browse the repository at this point in the history
* Run spotless before gradle check

Signed-off-by: Owais Kazi <[email protected]>

* Add precommit dependency for gradle check

Signed-off-by: Owais Kazi <[email protected]>

* Updated changelog

Signed-off-by: Owais Kazi <[email protected]>

* Updated ditribution

Signed-off-by: Owais Kazi <[email protected]>

Signed-off-by: Owais Kazi <[email protected]>
  • Loading branch information
owaiskazi19 authored Nov 8, 2022
1 parent 6d20423 commit 2139e80
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 21 deletions.
29 changes: 27 additions & 2 deletions .github/workflows/gradle-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,37 @@ on:
types: [opened, synchronize, reopened]

jobs:
spotless:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Spotless Check
run: ./gradlew spotlessCheck
precommit:
needs: spotless
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: 11
distribution: temurin
- name: Run Gradle
run: |
./gradlew javadoc precommit --parallel
gradle-check:
needs: precommit
runs-on: ubuntu-latest
timeout-minutes: 130
steps:
- name: Checkout OpenSearch repo
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}

Expand All @@ -40,7 +65,7 @@ jobs:
echo "pr_number=Null" >> $GITHUB_ENV
- name: Checkout opensearch-build repo
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: opensearch-project/opensearch-build
ref: main
Expand Down
19 changes: 0 additions & 19 deletions .github/workflows/precommit.yml

This file was deleted.

1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- OpenJDK Update (October 2022 Patch releases) ([#4997](https://github.com/opensearch-project/OpenSearch/pull/4997))
- Upgrade zookeeper dependency in hdfs-fixture ([#5007](https://github.com/opensearch-project/OpenSearch/pull/5007))
- Update Jackson to 2.14.0 ([#5105](https://github.com/opensearch-project/OpenSearch/pull/5105))
- Runs precommit before gradle check ([#5066](https://github.com/opensearch-project/OpenSearch/pull/5066))

### Changed
- Dependency updates (httpcore, mockito, slf4j, httpasyncclient, commons-codec) ([#4308](https://github.com/opensearch-project/OpenSearch/pull/4308))
Expand Down

0 comments on commit 2139e80

Please sign in to comment.