Skip to content

Commit

Permalink
Merge branch 'main' into fix/tokenbridge-init-checks
Browse files Browse the repository at this point in the history
  • Loading branch information
kyzooghost authored Dec 10, 2024
2 parents 61b69f0 + 8cf2866 commit e0ebca4
Show file tree
Hide file tree
Showing 400 changed files with 8,377 additions and 8,336 deletions.
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
**/node_modules
**/typechain
**/tsconfig.build.tsbuildinfo
**/coverage
**/dist
2 changes: 1 addition & 1 deletion .github/actions/image-tag-and-push/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ runs:
steps:
- name: Login to Docker Hub
if: ${{ github.ref == 'refs/heads/main' && inputs.last_commit_tag_exists == '0' }}
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ inputs.docker_username }}
password: ${{ inputs.docker_password }}
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/setup-nodejs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ inputs:
pnpm-version:
description: 'The version of pnpm to use'
required: true
default: '9.12.2'
default: '9.14.4'
pnpm-install-options:
description: 'The options to pass to pnpm install'
required: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/all-tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Filter commit changes
uses: dorny/paths-filter@v2
uses: dorny/paths-filter@v3
id: filter
with:
base: ${{ github.ref }}
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/bridge-ui-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ on:
- main
paths:
- 'bridge-ui/**'
- '!bridge-ui/**/*.md'
push:
branches:
- main
paths:
- 'bridge-ui/**'
- '!bridge-ui/**/*.md'

jobs:
run-e2e-tests:
Expand Down Expand Up @@ -56,7 +58,7 @@ jobs:
NEXT_PUBLIC_INFURA_ID: ${{ secrets.PUBLIC_BRIDGE_UI_INFURA_ID }}

- name: Archive Playwright report
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: playwright-report-headful
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/bridge-ui-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ on:
- main
paths:
- 'bridge-ui/**'
- '!bridge-ui/**/*.md'
push:
branches:
- main
paths:
- 'bridge-ui/**'
- '!bridge-ui/**/*.md'

jobs:
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 @@ -32,7 +32,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Filter commit changes
uses: dorny/paths-filter@v2
uses: dorny/paths-filter@v3
id: filter
with:
base: ${{ github.ref }}
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ name: "CodeQL"
on:
push:
branches: [ "main" ]
paths:
# '!**.md' will not work by itself to exclude *.md files. See https://github.com/orgs/community/discussions/25369
- '**'
- '!**.md'

jobs:
analyze:
Expand All @@ -39,7 +43,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand Down Expand Up @@ -78,7 +82,7 @@ jobs:
output: sarif-results
sarif-file: ${{ matrix.language }}-results.sarif
- name: Upload CodeQL Results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: codeql-results-${{ matrix.language }}
path: sarif-results
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/coordinator-build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
uses: gradle/actions/setup-gradle@v4
- name: Build dist
run: |
./gradlew coordinator:app:distZip --no-daemon
./gradlew coordinator:app:installDist --no-daemon
- name: Login to Docker Hub
if: ${{ env.DOCKERHUB_USERNAME != '' && env.DOCKERHUB_TOKEN != '' }}
uses: docker/login-action@v3
Expand All @@ -90,15 +90,15 @@ jobs:
uses: docker/setup-buildx-action@v3
- name: Docker meta
id: coordinator
uses: docker/metadata-action@v3
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE_NAME }}
- name: Build for testing
uses: docker/build-push-action@v6
if: ${{ env.PUSH_IMAGE == 'false' }}
with:
context: .
build-contexts: zip=./coordinator/app/build/distributions/
build-contexts: libs=./coordinator/app/build/install/coordinator/lib
file: ./coordinator/Dockerfile
platforms: linux/amd64
load: true
Expand All @@ -120,7 +120,7 @@ jobs:
if: ${{ env.PUSH_IMAGE == 'true' || github.event_name == 'workflow_dispatch' }}
with:
context: .
build-contexts: zip=./coordinator/app/build/distributions/
build-contexts: libs=./coordinator/app/build/install/coordinator/lib
file: ./coordinator/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coordinator-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
path: |
${{ github.workspace }}/build/reports/jacoco/jacocoRootReport/jacocoRootReport.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
files: ${{ github.workspace }}/build/reports/jacoco/jacocoRootReport/jacocoRootReport.xml
Expand Down
33 changes: 27 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
traces-api-facade: ${{ steps.filter.outputs.traces-api-facade }}
transaction-exclusion-api: ${{ steps.filter.outputs.transaction-exclusion-api }}
finalized-tag-updater: ${{ steps.filter.outputs.finalized-tag-updater }}
has-changes-requiring-build: ${{ steps.filter-out.outputs.has-changes-requiring-build }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -51,7 +52,9 @@ jobs:
- 'docker/compose-local-dev.overrides.yml'
- 'docker/compose-local-dev-traces-v2.overrides.yml'
postman:
- 'postman/**'
- 'sdk/**'
- 'ts-libs/linea-native-libs/**'
- '.github/workflows/postman-*.yml'
- '.github/workflows/build-and-publish.yml'
- '.github/workflows/main.yml'
Expand Down Expand Up @@ -110,10 +113,23 @@ jobs:
- 'finalized-tag-updater/**'
- '.github/workflows/main.yml'
- '.github/workflows/finalized-tag-updater-github-release.yml'
- name: Filter out commit changes
uses: dorny/paths-filter@v3
id: filter-out
with:
base: ${{ github.ref }}
list-files: "json"
filters: |
has-changes-requiring-build:
- '!**/*.md'
- '!docs/**'
# Enables us to exclude changes in multiple file types if required
predicate-quantifier: 'every'

check-and-tag-images:
needs: [ store-image-name-and-tags, filter-commit-changes ]
uses: ./.github/workflows/reuse-check-images-tags-and-push.yml
if: ${{ needs.filter-commit-changes.outputs.has-changes-requiring-build == 'true' }}
with:
commit_tag: ${{ needs.store-image-name-and-tags.outputs.commit_tag }}
last_commit_tag: ${{ needs.store-image-name-and-tags.outputs.last_commit_tag }}
Expand All @@ -128,6 +144,7 @@ jobs:
manual-docker-build-and-e2e-tests:
runs-on: [self-hosted, ubuntu-20.04, X64, small]
needs: [ store-image-name-and-tags, filter-commit-changes, check-and-tag-images ]
if: ${{ needs.filter-commit-changes.outputs.has-changes-requiring-build == 'true' }}
environment: ${{ github.ref != 'refs/heads/main' && 'docker-build-and-e2e' || '' }}
concurrency:
group: manual-docker-build-and-e2e-tests-${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -166,7 +183,7 @@ jobs:

testing:
needs: [ store-image-name-and-tags, filter-commit-changes, check-and-tag-images ]
if: ${{ always() }}
if: ${{ always() && needs.filter-commit-changes.outputs.has-changes-requiring-build == 'true' }}
uses: ./.github/workflows/testing.yml
with:
commit_tag: ${{ needs.store-image-name-and-tags.outputs.commit_tag }}
Expand All @@ -178,8 +195,9 @@ jobs:
secrets: inherit

run-e2e-tests-geth-tracing:
needs: [ store-image-name-and-tags, docker-build, manual-docker-build-and-e2e-tests ]
if: ${{ always() && needs.docker-build.result == 'success' }}
needs: [ store-image-name-and-tags, docker-build, manual-docker-build-and-e2e-tests, filter-commit-changes ]
# Make this execute for has-changes-requiring-build == 'false' so that we can get to the required job @ which is in reuse-run-e2e-tests.yml
if: ${{ always() && needs.filter-commit-changes.outputs.has-changes-requiring-build == 'false' || needs.docker-build.result == 'success' }}
concurrency:
group: run-e2e-tests-geth-tracing-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
Expand All @@ -188,11 +206,13 @@ jobs:
commit_tag: ${{ needs.store-image-name-and-tags.outputs.commit_tag }}
tracing-engine: 'geth'
e2e-tests-logs-dump: true
has-changes-requiring-build: ${{ needs.filter-commit-changes.outputs.has-changes-requiring-build }}
secrets: inherit

run-e2e-tests:
needs: [ store-image-name-and-tags, docker-build, manual-docker-build-and-e2e-tests ]
if: ${{ always() && needs.docker-build.result == 'success' }}
needs: [ store-image-name-and-tags, docker-build, manual-docker-build-and-e2e-tests, filter-commit-changes ]
# Make this execute for has-changes-requiring-build == 'false' so that we can get to the required job @ which is in reuse-run-e2e-tests.yml
if: ${{ always() && needs.filter-commit-changes.outputs.has-changes-requiring-build == 'false' || needs.docker-build.result == 'success' }}
concurrency:
group: run-e2e-tests-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
Expand All @@ -201,6 +221,7 @@ jobs:
commit_tag: ${{ needs.store-image-name-and-tags.outputs.commit_tag }}
tracing-engine: 'besu'
e2e-tests-logs-dump: true
has-changes-requiring-build: ${{ needs.filter-commit-changes.outputs.has-changes-requiring-build }}
secrets: inherit

publish-images-after-run-tests-success-on-main:
Expand Down Expand Up @@ -228,7 +249,7 @@ jobs:
if: ${{ always() }}
runs-on: [self-hosted, ubuntu-20.04, X64, small]
steps:
- uses: strumwolf/delete-deployment-environment@v2
- uses: strumwolf/delete-deployment-environment@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
environment: docker-build-and-e2e
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/postman-build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
if: ${{ env.PUSH_IMAGE == 'false' }}
with:
context: ./
file: ./sdk/Dockerfile
file: ./postman/Dockerfile
platforms: linux/amd64
load: true
push: false
Expand All @@ -116,7 +116,7 @@ jobs:
if: ${{ env.PUSH_IMAGE == 'true' || github.event_name == 'workflow_dispatch' }}
with:
context: ./
file: ./sdk/Dockerfile
file: ./postman/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ env.TAGS }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/postman-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ jobs:
run: |
pnpm run -F ./ts-libs/linea-native-libs build;
pnpm run -F ./sdk build;
pnpm run -F ./postman test;
pnpm run -F ./sdk test;
10 changes: 5 additions & 5 deletions .github/workflows/prover-native-lib-blob-compressor-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: 1.22.x

Expand All @@ -50,7 +50,7 @@ jobs:
GOARCH="amd64" go build -tags=nocorset -buildmode=c-shared -o ./target/${TARGET_DECOMPRESSOR}_${VERSION}_linux_x86_64.so ${SRC_DECOMPRESSOR}
- name: Cache built binaries
uses: actions/upload-artifact@master
uses: actions/upload-artifact@v4
with:
name: linux-artefacts
path: ./prover/target
Expand All @@ -61,7 +61,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: 1.22.x
architecture: arm64
Expand All @@ -84,7 +84,7 @@ jobs:
GOARCH="arm64" go build -tags=nocorset -buildmode=c-shared -o ./target/${TARGET_COMPRESSOR}_${VERSION}_linux_arm64.so ${SRC_COMPRESSOR}
GOARCH="arm64" go build -tags=nocorset -buildmode=c-shared -o ./target/${TARGET_DECOMPRESSOR}_${VERSION}_linux_arm64.so ${SRC_DECOMPRESSOR}
- name: Cache built binaries
uses: actions/upload-artifact@master
uses: actions/upload-artifact@v4
with:
name: linux-arm64-artefacts
path: ./prover/target
Expand All @@ -95,7 +95,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: 1.22.x
- name: Build the MacOS artefacts
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/prover-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ jobs:
name: Prover static check
steps:
- name: install Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: 1.23.x
- name: checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: |
~/go/pkg/mod
Expand All @@ -42,7 +42,7 @@ jobs:
working-directory: prover
run: if [[ -n $(gofmt -l .) ]]; then echo "please run gofmt"; exit 1; fi
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v6
with:
version: v1.61.0
working-directory: prover
Expand All @@ -65,12 +65,12 @@ jobs:
- staticcheck
steps:
- name: install Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: checkout code
uses: actions/checkout@v4
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: |
~/go/pkg/mod
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/reuse-run-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ on:
required: false
type: boolean
default: true
has-changes-requiring-build:
type: string
outputs:
tests_outcome:
value: ${{ jobs.run-e2e-tests.outputs.tests_outcome }}
Expand All @@ -59,7 +61,10 @@ on:
required: false

jobs:
# Required job
run-e2e-tests:
# We can only use conditionals, and not path filters to 'successfully' skip a required job - https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks#handling-skipped-but-required-checks
if: ${{ inputs.has-changes-requiring-build == 'true' }}
env:
COORDINATOR_TAG: ${{ inputs.commit_tag }}
POSTMAN_TAG: ${{ inputs.commit_tag }}
Expand Down
Loading

0 comments on commit e0ebca4

Please sign in to comment.