diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 11bac0fb923..5264e85a845 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,5 +1,17 @@ - - +### Thanks for sending a pull request! Have you done the following? + +- [ ] Checked out our [contribution guidelines](https://github.com/hyperledger/besu/blob/main/CONTRIBUTING.md)? +- [ ] Considered documentation and adding the `doc-change-required` label to this PR [if updates are required](https://wiki.hyperledger.org/display/BESU/Documentation). +- [ ] Considered the changelog and included an [update if required](https://wiki.hyperledger.org/display/BESU/Changelog). +- [ ] For database changes (e.g. KeyValueSegmentIdentifier) considered compatibility and performed forwards and backwards compatibility tests + +### Most advanced CI tests are deferred until PR approval, but you could: + +- [ ] locally run all unit tests via: `./gradlew build` +- [ ] locally run all acceptance tests via: `./gradlew acceptanceTests` +- [ ] locally run all integration tests via: `./gradlew integrationTest` +- [ ] locally run all reference tests via: `./gradlew ethereum:referenceTests:referenceTests` + ## PR description diff --git a/.github/workflows/acceptance-tests.yml b/.github/workflows/acceptance-tests.yml index 6e44b924d0c..39af80ba6e6 100644 --- a/.github/workflows/acceptance-tests.yml +++ b/.github/workflows/acceptance-tests.yml @@ -1,5 +1,6 @@ name: acceptance-tests on: + workflow_dispatch: pull_request_target: branches: - main @@ -33,7 +34,7 @@ jobs: repo: context.repo.repo, ref: RELEVANT_SHA, }); - const acceptanceTested = statuses && statuses.filter(({ context }) => context === 'acceptance-tests'); + const acceptanceTested = statuses && statuses.filter(({ context }) => context === 'accepttests-passed'); const alreadyRun = acceptanceTested && acceptanceTested.find(({ state }) => state === 'success') > 0; const { data: reviews } = await github.rest.pulls.listReviews({ owner: context.repo.owner, @@ -79,7 +80,7 @@ jobs: path: tmp/junit-xml-reports-downloaded if_no_artifact_found: true - name: setup gradle - uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa + uses: gradle/actions/setup-gradle@9e899d11ad247ec76be7a60bc1cf9d3abbb9e7f1 - name: Split tests id: split-tests uses: r7kamura/split-tests-by-timings@9322bd292d9423e2bc5a65bec548901801341e3f diff --git a/.github/workflows/artifacts.yml b/.github/workflows/artifacts.yml index 93684c7292a..8ad8b4ecfc8 100644 --- a/.github/workflows/artifacts.yml +++ b/.github/workflows/artifacts.yml @@ -20,7 +20,7 @@ jobs: distribution: 'temurin' java-version: '17' - name: setup gradle - uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa + uses: gradle/actions/setup-gradle@9e899d11ad247ec76be7a60bc1cf9d3abbb9e7f1 - name: assemble distributions run: ./gradlew -Prelease.releaseVersion=${{github.ref_name}} -Pversion=${{github.ref_name}} assemble -Dorg.gradle.parallel=true -Dorg.gradle.caching=true diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index da937f24257..f0340e168c7 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -12,6 +12,7 @@ name: "CodeQL" on: + workflow_dispatch: push: branches: [ main ] pull_request: @@ -48,7 +49,7 @@ jobs: queries: security-and-quality,security-extended - name: setup gradle - uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa + uses: gradle/actions/setup-gradle@9e899d11ad247ec76be7a60bc1cf9d3abbb9e7f1 - name: compileJava noscan run: | JAVA_OPTS="-Xmx2048M" ./gradlew --no-scan compileJava diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 9c5d4a84e11..f7504672e35 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -18,7 +18,7 @@ jobs: distribution: temurin java-version: 17 - name: setup gradle - uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa + uses: gradle/actions/setup-gradle@9e899d11ad247ec76be7a60bc1cf9d3abbb9e7f1 - name: hadoLint_openj9-jdk_17 run: docker run --rm -i hadolint/hadolint < docker/openj9-jdk-17/Dockerfile - name: hadoLint_openjdk_17 @@ -65,7 +65,7 @@ jobs: distribution: temurin java-version: 17 - name: setup gradle - uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa + uses: gradle/actions/setup-gradle@9e899d11ad247ec76be7a60bc1cf9d3abbb9e7f1 - name: install goss run: | mkdir -p docker/reports @@ -77,7 +77,7 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: build and test docker - uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa + uses: gradle/actions/setup-gradle@9e899d11ad247ec76be7a60bc1cf9d3abbb9e7f1 env: architecture: ${{ steps.prep.outputs.ARCH }} with: @@ -101,7 +101,7 @@ jobs: distribution: temurin java-version: 17 - name: setup gradle - uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa + uses: gradle/actions/setup-gradle@9e899d11ad247ec76be7a60bc1cf9d3abbb9e7f1 - name: login to ghcr uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d with: diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index e1d1eaf3131..80a2eca1e27 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -1,5 +1,6 @@ name: integration-tests on: + workflow_dispatch: pull_request_target: branches: - main @@ -66,7 +67,7 @@ jobs: distribution: temurin java-version: 17 - name: setup gradle - uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa + uses: gradle/actions/setup-gradle@9e899d11ad247ec76be7a60bc1cf9d3abbb9e7f1 - name: run integration tests run: ./gradlew integrationTest compileJmh -Dorg.gradle.parallel=true -Dorg.gradle.caching=true - name: Publish Test Report diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 90e43417c46..798a9b25198 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -23,7 +23,7 @@ jobs: distribution: temurin java-version: 17 - name: setup gradle - uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa + uses: gradle/actions/setup-gradle@9e899d11ad247ec76be7a60bc1cf9d3abbb9e7f1 - name: hadoLint_openj9-jdk_17 run: docker run --rm -i hadolint/hadolint < docker/openj9-jdk-17/Dockerfile - name: hadoLint_openjdk_17 @@ -68,10 +68,14 @@ jobs: with: distribution: temurin java-version: 17 - - name: setup gradle - uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa + - name: login to ghcr + uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d + with: + registry: ${{ env.registry }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: build image - uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa + uses: gradle/actions/setup-gradle@9e899d11ad247ec76be7a60bc1cf9d3abbb9e7f1 with: arguments: distDocker -PdockerOrgName=${{ env.registry }}/${{ github.repository_owner }} -Pbranch=main - name: install goss @@ -79,7 +83,7 @@ jobs: mkdir -p docker/reports curl -L https://github.com/aelsabbahy/goss/releases/download/v0.4.4/goss-${{ steps.prep.outputs.PLATFORM_PAIR }} -o ./docker/tests/goss-${{ steps.prep.outputs.PLATFORM_PAIR }} - name: test docker - uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa + uses: gradle/actions/setup-gradle@9e899d11ad247ec76be7a60bc1cf9d3abbb9e7f1 env: architecture: ${{ steps.prep.outputs.ARCH }} with: @@ -109,7 +113,7 @@ jobs: distribution: temurin java-version: 17 - name: setup gradle - uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa + uses: gradle/actions/setup-gradle@9e899d11ad247ec76be7a60bc1cf9d3abbb9e7f1 - name: Login to DockerHub uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d with: diff --git a/.github/workflows/pr-checklist-on-open.yml b/.github/workflows/pr-checklist-on-open.yml deleted file mode 100644 index 8c9aad72c21..00000000000 --- a/.github/workflows/pr-checklist-on-open.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: "comment on pr with checklist" -on: - pull_request_target: - types: [ opened ] - branches: [ main ] -jobs: - checklist: - name: "add checklist as a comment on newly opened PRs" - runs-on: ubuntu-22.04 - permissions: - pull-requests: write - steps: - - uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea - with: - github-token: ${{secrets.GITHUB_TOKEN}} - script: | - github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: '- [ ] I thought about documentation and added the `doc-change-required` label to this PR if [updates are required](https://wiki.hyperledger.org/display/BESU/Documentation).\n- [ ] I thought about the changelog and included a [changelog update if required](https://wiki.hyperledger.org/display/BESU/Changelog).\n- [ ] If my PR includes database changes (e.g. KeyValueSegmentIdentifier) I have thought about compatibility and performed forwards and backwards compatibility tests\n- [ ] I thought about running CI.\n- [ ] If I did not run CI, I ran as much locally as possible before pushing.\n' - }) diff --git a/.github/workflows/pre-review.yml b/.github/workflows/pre-review.yml index 9dde5cd844b..0d3a3e6c900 100644 --- a/.github/workflows/pre-review.yml +++ b/.github/workflows/pre-review.yml @@ -40,7 +40,7 @@ jobs: distribution: temurin java-version: 17 - name: Setup Gradle - uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa + uses: gradle/actions/setup-gradle@9e899d11ad247ec76be7a60bc1cf9d3abbb9e7f1 - name: run spotless run: ./gradlew spotlessCheck -Dorg.gradle.parallel=true -Dorg.gradle.caching=true compile: @@ -58,7 +58,7 @@ jobs: distribution: temurin java-version: 17 - name: Setup Gradle - uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa + uses: gradle/actions/setup-gradle@9e899d11ad247ec76be7a60bc1cf9d3abbb9e7f1 - name: Gradle Compile run: ./gradlew build -x test -x spotlessCheck -Dorg.gradle.parallel=true -Dorg.gradle.caching=true unitTests: @@ -91,7 +91,7 @@ jobs: distribution: temurin java-version: 17 - name: Setup Gradle - uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa + uses: gradle/actions/setup-gradle@9e899d11ad247ec76be7a60bc1cf9d3abbb9e7f1 - name: run unit tests id: unitTest run: ./gradlew $GRADLEW_UNIT_TEST_ARGS -Dorg.gradle.parallel=true -Dorg.gradle.caching=true diff --git a/.github/workflows/reference-tests.yml b/.github/workflows/reference-tests.yml index 8d1c2f73cd0..ccb03632db3 100644 --- a/.github/workflows/reference-tests.yml +++ b/.github/workflows/reference-tests.yml @@ -1,5 +1,6 @@ name: reference-tests on: + workflow_dispatch: pull_request_target: branches: - main @@ -36,7 +37,7 @@ jobs: }); - const refTested = statuses && statuses.filter(({ context }) => context === 'reference-tests'); + const refTested = statuses && statuses.filter(({ context }) => context === 'reftests-passed'); const alreadyRun = refTested && refTested.find(({ state }) => state === 'success') > 0; const { data: reviews } = await github.rest.pulls.listReviews({ owner: context.repo.owner, diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 54c28bea64a..1be195fb9ba 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,7 @@ jobs: - name: Login to DockerHub run: echo '${{ secrets.DOCKER_PASSWORD_RW }}' | docker login -u '${{ secrets.DOCKER_USER_RW }}' --password-stdin - name: Setup Gradle - uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa + uses: gradle/actions/setup-gradle@9e899d11ad247ec76be7a60bc1cf9d3abbb9e7f1 - name: Docker upload run: ./gradlew "-Prelease.releaseVersion=${{ github.ref_name }}" "-PdockerOrgName=${{ secrets.DOCKER_ORG }}" dockerUploadRelease - name: Docker manifest diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 04bb0405b87..7891a6819db 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -29,7 +29,7 @@ jobs: key: ${{ runner.os }}-sonar restore-keys: ${{ runner.os }}-sonar - name: setup gradle - uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa + uses: gradle/actions/setup-gradle@9e899d11ad247ec76be7a60bc1cf9d3abbb9e7f1 - name: Build and analyze env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any