Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/bridge-ui/next-14.2.10
Browse files Browse the repository at this point in the history
  • Loading branch information
VGau authored Oct 2, 2024
2 parents 59e58d2 + e3d2839 commit 0b294ee
Show file tree
Hide file tree
Showing 408 changed files with 20,996 additions and 29,917 deletions.
7 changes: 7 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ max_line_length=120
insert_final_newline = true
trim_trailing_whitespace = true

[*.{kt,kts}]
ij_kotlin_code_style_defaults = KOTLIN_OFFICIAL

ij_kotlin_name_count_to_use_star_import = 2147483647
ij_kotlin_name_count_to_use_star_import_for_members = 2147483647
ij_kotlin_packages_to_use_import_on_demand = unset

[*.go]
indent_style = tab
indent_size = tab
Expand Down
39 changes: 18 additions & 21 deletions .github/workflows/all-tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,21 @@ on:
branches:
- main
paths:
- 'operations/**'
- 'operations/'
- '.github/workflows/all-tools.yml'
pull_request:
branches:
- main
paths:
- 'operations/**'

env:
DOCKER_IMAGE_NAME: consensys/linea-alltools
- 'operations/'
- '.github/workflows/all-tools.yml'

jobs:
changes:
runs-on: ubuntu-latest
runs-on: besu-arm64
name: Filter commit changes
outputs:
all-tools: ${{ steps.filter.outputs.all-tools }}
all-tools: ${{ steps.filter.outputs['all-tools'] }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -38,29 +37,29 @@ jobs:
store_image_name_and_tags:
uses: ./.github/workflows/reuse-store-image-name-and-tags.yml

check_image_tags_exist:
runs-on: ubuntu-latest
runs-on: besu-arm64
name: Check image tags exist
needs: [ changes, store_image_name_and_tags ]
if: ${{ needs.changes.outputs.all-tools == 'false' }}
if: ${{ needs.changes.outputs['all-tools'] == 'false' }}
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v4
- name: Check image tags exist
uses: ./.github/actions/check-image-tags-exist
with:
last_commit_tag: ${{ needs.store_image_name_and_tags.outputs.last_commit_tag }}
common_ancestor_tag: ${{ needs.store_image_name_and_tags.outputs.common_ancestor_tag }}
image_name: ${{ env.DOCKER_IMAGE_NAME }}
image_name: consensys/linea-alltools
docker_username: ${{ secrets.DOCKERHUB_USERNAME }}
docker_password: ${{ secrets.DOCKERHUB_TOKEN }}

all-tools-tag-only:
runs-on: ubuntu-latest
runs-on: besu-arm64
name: All tools tag only
needs: [ changes, store_image_name_and_tags, check_image_tags_exist ]
if: ${{ github.event_name != 'pull_request' && needs.changes.outputs.all-tools == 'false' }}
if: ${{ github.event_name != 'pull_request' && needs.changes.outputs['all-tools'] == 'false' }}
outputs:
image_tagged: ${{ steps.image_tag_push.outputs.image_tagged }}
steps:
Expand All @@ -75,20 +74,20 @@ jobs:
common_ancestor_tag: ${{ needs.store_image_name_and_tags.outputs.common_ancestor_tag }}
develop_tag: ${{ needs.store_image_name_and_tags.outputs.develop_tag }}
untested_tag_suffix: ${{ needs.store_image_name_and_tags.outputs.untested_tag_suffix }}
image_name: ${{ env.DOCKER_IMAGE_NAME }}
image_name: consensys/linea-alltools
last_commit_tag_exists: ${{ needs.check_image_tags_exist.outputs.last_commit_tag_exists }}
common_ancestor_commit_tag_exists: ${{ needs.check_image_tags_exist.outputs.common_ancestor_commit_tag_exists }}
docker_username: ${{ secrets.DOCKERHUB_USERNAME }}
docker_password: ${{ secrets.DOCKERHUB_TOKEN }}

build-and-publish:
needs: [ changes, store_image_name_and_tags, all-tools-tag-only ]
if: ${{ always() && (needs.changes.outputs.all-tools == 'true' || needs.all-tools-tag-only.result != 'success' || needs.all-tools-tag-only.outputs.image_tagged != 'true') }}
if: ${{ always() && (needs.changes.outputs['all-tools'] == 'true' || needs.all-tools-tag-only.result != 'success' || needs.all-tools-tag-only.outputs.image_tagged != 'true') }}
runs-on: ubuntu-22.04
env:
COMMIT_TAG: ${{ needs.store_image_name_and_tags.outputs.commit_tag }}
DEVELOP_TAG: ${{ needs.store_image_name_and_tags.outputs.develop_tag }}
IMAGE_NAME: ${{ env.DOCKER_IMAGE_NAME }}
IMAGE_NAME: consensys/linea-alltools
name: All tools build and push
steps:
- name: Checkout
Expand Down Expand Up @@ -116,15 +115,13 @@ jobs:
- name: Show the "version" build argument
run: |
echo "We inject the commit tag in the docker image ${{ env.COMMIT_TAG }}"
echo COMMIT_TAG=${{ env.COMMIT_TAG }} >> $GITHUB_ENV
echo COMMIT_TAG=${{ env.COMMIT_TAG }} >> GITHUB_ENV
- name: Build and push all tools image
uses: docker/build-push-action@v6
with:
context: .
file: ./operations/Dockerfile
platforms: linux/amd64
# Note: Build amd64 image only
# platforms: linux/amd64,linux/arm64
platforms: linux/amd64 # Note: Build amd64 image only
push: ${{ github.event_name != 'pull_request' }}
tags: |
${{ env.IMAGE_NAME }}:${{ env.COMMIT_TAG }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/bridge-ui-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:

jobs:
run-e2e-tests:
runs-on: ubuntu-22.04-16core
runs-on: besu-arm64
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -27,7 +27,7 @@ jobs:
with:
node-version: 18.17.0
pnpm-install-options: '--frozen-lockfile --prefer-offline'

- name: Install Playwright
run: pnpm dlx playwright@1.45.3 install --with-deps

Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
E2E_TEST_SEED_PHRASE: "test test test test test test test test test test test junk"
E2E_TEST_WALLET_PASSWORD: "TestPassword!"
NEXT_PUBLIC_INFURA_ID: ${{ secrets.PUBLIC_BRIDGE_UI_INFURA_ID }}

- name: Archive Playwright report
uses: actions/upload-artifact@v3
if: failure()
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/bridge-ui-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:

jobs:
publish:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
if: github.event_name != 'pull_request' || (github.event_name == 'pull_request' && github.event.pull_request.draft == false)
steps:
- name: Checkout
Expand All @@ -35,10 +35,8 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- # Setting up Docker Buildx with docker-container driver is required
# at the moment to be able to use a subdirectory with Git context
name: Set up Docker Buildx

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Docker Image Build and Publish
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cache-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
changes:
runs-on: ubuntu-latest
runs-on: besu-arm64
name: Filter commit changes
outputs:
cache-images: ${{ steps.filter.outputs.cache-images }}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/coordinator-build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,15 @@ on:
DOCKERHUB_TOKEN:
required: true

concurrency:
group: coordinator-build-and-publish-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref_name != 'main' }}

jobs:
build-and-publish:
runs-on: ubuntu-22.04
name: Coordinator build
environment: ${{ github.ref != 'refs/heads/main' && 'docker-build-and-e2e' || '' }}
env:
COMMIT_TAG: ${{ inputs.commit_tag }}
DEVELOP_TAG: ${{ inputs.develop_tag }}
Expand Down
16 changes: 14 additions & 2 deletions .github/workflows/coordinator-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
DOCKERHUB_TOKEN:
required: true

concurrency:
group: coordinator-testing-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref_name != 'main' }}

jobs:
cache-docker-images:
uses: ./.github/workflows/cache-docker-images.yml
Expand Down Expand Up @@ -94,5 +98,13 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}
message-path: |
${{ github.workspace }}/build/reports/jacoco/jacocoRootReport/coverageDeltaReports/DeltaSummary.md
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
files: ${{ github.workspace }}/build/reports/jacoco/jacocoRootReport/jacocoRootReport.xml
flags: kotlin
os: linux
name: codecov-coordinator
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
14 changes: 7 additions & 7 deletions .github/workflows/load-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,34 +21,34 @@ on:
required: false
type: string

concurrency:
concurrency:
group: load-test-${{ github.event.inputs.network }}-${{ github.ref }}
cancel-in-progress: false

jobs:
run-load-test:
runs-on: ubuntu-latest
runs-on: besu-arm64
name: Run Load Test
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.head_ref }}

- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Hide sensitive inputs
uses: levibostian/action-hide-sensitive-inputs@1.0.0
with:
exclude_inputs: network, file

- name: Determine Private Key
id: set_private_key
run: |
Expand All @@ -62,8 +62,8 @@ jobs:
echo "Using sepolia private key from secrets."
echo "PRIVATE_KEY=${{ secrets.SEPOLIA_LOAD_TEST_PRIVATE_KEY }}" >> $GITHUB_ENV
fi
- name: Load Test
run: |
echo "Network to execute load test on: ${{ github.event.inputs.network }}"
./gradlew :testing-tools:app:run --args="-request ${{ github.event.inputs.network }}/${{ github.event.inputs.file }} -pk $PRIVATE_KEY"
./gradlew :testing-tools:app:run --args="-request ${{ github.event.inputs.network }}/${{ github.event.inputs.file }} -pk $PRIVATE_KEY"
34 changes: 31 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
uses: ./.github/workflows/reuse-store-image-name-and-tags.yml

filter-commit-changes:
runs-on: ubuntu-latest
runs-on: besu-arm64
name: Filter commit changes
outputs:
coordinator: ${{ steps.filter.outputs.coordinator }}
Expand Down Expand Up @@ -65,7 +65,13 @@ jobs:
- 'constraints'
traces-api-facade:
- 'traces-api-facade/**'
- 'jvm-libs/**'
- 'jvm-libs/core/domain-models/**'
- 'jvm-libs/json-rpc/**'
- 'jvm-libs/kotlin-extensions/**'
- 'jvm-libs/future-extensions/**'
- 'jvm-libs/vertx-helper/**'
- 'jvm-libs/traces/**'
- 'jvm-libs/metrics/**'
- 'config/common/traces-limits-v1.toml'
- '.github/workflows/traces-api-facade-*.yml'
- '.github/workflows/build-and-publish.yml'
Expand All @@ -77,6 +83,10 @@ jobs:
- 'gradle.properties'
- 'settings.gradle'
finalized-tag-updater:
- 'jvm-libs/core/long-running-service/**'
- 'jvm-libs/kotlin-extensions/**'
- 'jvm-libs/future-extensions/**'
- 'jvm-libs/web3j-extensions/**'
- 'finalized-tag-updater/**'
- '.github/workflows/main.yml'
- '.github/workflows/finalized-tag-updater-github-release.yml'
Expand Down Expand Up @@ -114,7 +124,7 @@ jobs:
prover_image_tagged: ${{ needs.check-and-tag-images.outputs.image_tagged_prover }}
traces_api_facade_image_tagged: ${{ needs.check-and-tag-images.outputs.image_tagged_traces_api_facade }}
secrets: inherit

# Comment out the auto build and release step below as the plugin release should be
# by manual Github action for versioning control
# finalized-tag-updater-jar-build-release:
Expand Down Expand Up @@ -142,6 +152,9 @@ jobs:
run-e2e-tests-geth-tracing:
needs: [ store-image-name-and-tags, docker-build ]
if: ${{ always() && needs.docker-build.result == 'success' }}
concurrency:
group: run-e2e-tests-geth-tracing-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref_name != 'main' }}
uses: ./.github/workflows/reuse-run-e2e-tests.yml
with:
commit_tag: ${{ needs.store-image-name-and-tags.outputs.commit_tag }}
Expand All @@ -153,6 +166,9 @@ jobs:
run-e2e-tests:
needs: [ store-image-name-and-tags, docker-build ]
if: ${{ always() && needs.docker-build.result == 'success' }}
concurrency:
group: run-e2e-tests-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref_name != 'main' }}
uses: ./.github/workflows/reuse-run-e2e-tests.yml
with:
commit_tag: ${{ needs.store-image-name-and-tags.outputs.commit_tag }}
Expand All @@ -171,3 +187,15 @@ jobs:
untested_tag_suffix: ${{ needs.store-image-name-and-tags.outputs.untested_tag_suffix }}
image_names: '["consensys/linea-coordinator", "consensys/linea-postman", "consensys/linea-prover", "consensys/linea-traces-api-facade"]'
secrets: inherit

cleanup-deployments:
needs: [ run-e2e-tests, run-e2e-tests-geth-tracing ]
if: ${{ always() }}
runs-on: besu-arm64
steps:
- uses: strumwolf/delete-deployment-environment@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
environment: docker-build-and-e2e
ref: ${{ github.ref_name }}
onlyRemoveDeployments: true
5 changes: 5 additions & 0 deletions .github/workflows/postman-build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,15 @@ on:
DOCKERHUB_TOKEN:
required: true

concurrency:
group: postman-build-and-publish-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref_name != 'main' }}

jobs:
build-and-publish:
runs-on: ubuntu-22.04
name: Postman build
environment: ${{ github.ref != 'refs/heads/main' && 'docker-build-and-e2e' || '' }}
env:
COMMIT_TAG: ${{ inputs.commit_tag }}
DEVELOP_TAG: ${{ inputs.develop_tag }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/postman-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
DOCKERHUB_TOKEN:
required: true

concurrency:
group: postman-testing-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref_name != 'main' }}

jobs:
run-tests:
runs-on: ubuntu-22.04
Expand Down
Loading

0 comments on commit 0b294ee

Please sign in to comment.