-
Notifications
You must be signed in to change notification settings - Fork 860
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Justin Florentine <[email protected]>
- Loading branch information
Showing
2 changed files
with
84 additions
and
39 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
name: pre-review | ||
|
||
on: | ||
pull_request: | ||
|
||
env: | ||
GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true | ||
|
||
jobs: | ||
repolint: | ||
name: "Repository Linting" | ||
runs-on: ubuntu-22.04 | ||
container: ghcr.io/todogroup/repolinter:v0.11.2 | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
- name: Lint Repo | ||
run: bundle exec /app/bin/repolinter.js --rulesetUrl https://raw.githubusercontent.com/hyperledger-labs/hyperledger-community-management-tools/main/repo_structure/repolint.json --format markdown | ||
gradle-wrapper: | ||
name: "Gradle Wrapper Validation" | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: gradle/[email protected] | ||
spotless: | ||
runs-on: ubuntu-22.04 | ||
if: ${{ github.actor != 'dependabot[bot]' }} | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
- name: Set up Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: adopt | ||
java-version: 17 | ||
- name: Setup Gradle | ||
uses: gradle/[email protected] | ||
- name: run spotless | ||
run: ./gradlew spotlessCheck -Dorg.gradle.parallel=true -Dorg.gradle.caching=true | ||
compile: | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 30 | ||
needs: [spotless, gradle-wrapper, repolint] | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
- name: Set up Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: adopt | ||
java-version: 17 | ||
- name: Setup Gradle | ||
uses: gradle/[email protected] | ||
- name: Run Build | ||
run: ./gradlew build -x test -x spotlessCheck -Dorg.gradle.parallel=true -Dorg.gradle.caching=true | ||
unitTests: | ||
runs-on: besu-research-ubuntu-8 | ||
needs: [ compile ] | ||
permissions: | ||
checks: write | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
- name: Set up Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: adopt | ||
java-version: 17 | ||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v2 | ||
run: ./gradlew build -Dorg.gradle.parallel=true -Dorg.gradle.caching=true | ||
- name: Upload Test Report | ||
uses: actions/upload-artifact@v3 | ||
if: always() # always run even if the previous step fails | ||
with: | ||
name: junit-xml-reports | ||
path: '**/build/test-results/test/TEST-*.xml' | ||
retention-days: 1 | ||
- name: Publish Test Report | ||
uses: mikepenz/action-junit-report@v4 | ||
if: success() || failure() # always run even if the build step fails | ||
with: | ||
report_paths: '**/test-results/test/TEST-*.xml' | ||
annotate_only: true |