From 7444247b8de9a935bac29f642df4181099fbd161 Mon Sep 17 00:00:00 2001 From: Justin Florentine Date: Wed, 6 Dec 2023 15:46:12 -0500 Subject: [PATCH] breaking this up was a fools errand Signed-off-by: Justin Florentine --- .github/workflows/checks.yml | 39 --------------- .github/workflows/pre-review.yml | 84 ++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+), 39 deletions(-) delete mode 100644 .github/workflows/checks.yml create mode 100644 .github/workflows/pre-review.yml diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml deleted file mode 100644 index 410339fd0cf..00000000000 --- a/.github/workflows/checks.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: checks - -on: - pull_request: - -env: - GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true - -jobs: - lint: - 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/wrapper-validation-action@v1.1.0 - 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/gradle-build-action@v2.10.0 - - name: run spotless - run: ./gradlew spotlessCheck -Dorg.gradle.parallel=true -Dorg.gradle.caching=true diff --git a/.github/workflows/pre-review.yml b/.github/workflows/pre-review.yml new file mode 100644 index 00000000000..9d07d2e7b79 --- /dev/null +++ b/.github/workflows/pre-review.yml @@ -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/wrapper-validation-action@v1.1.0 + 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/gradle-build-action@v2.10.0 + - 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/gradle-build-action@v2.10.0 + - 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