-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into feat-dont-require-w…
…allet
- Loading branch information
Showing
102 changed files
with
2,536 additions
and
1,358 deletions.
There are no files selected for viewing
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
This file was deleted.
Oops, something went wrong.
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,13 @@ | ||
name: Restore build artifacts | ||
description: Restore build artifacts | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Restore build artifacts | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: | | ||
./packages/arb-token-bridge-ui/build | ||
key: build-artifacts-${{ github.run_id }} | ||
fail-on-cache-miss: true |
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
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,48 @@ | ||
name: Cache build artifacts | ||
|
||
on: | ||
workflow_call: | ||
|
||
env: | ||
NEXT_PUBLIC_INFURA_KEY: ${{ secrets.NEXT_PUBLIC_INFURA_KEY }} | ||
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID }} | ||
THE_GRAPH_NETWORK_API_KEY: ${{ secrets.THE_GRAPH_NETWORK_API_KEY }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
jobs: | ||
check-build-cache: | ||
name: Check cache for build artifacts | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Check cache for build artifacts | ||
id: cache | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: | | ||
./packages/arb-token-bridge-ui/build | ||
key: build-artifacts-${{ github.run_id }} | ||
|
||
- name: Install node_modules | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
uses: OffchainLabs/actions/node-modules/install@main | ||
|
||
- name: Build | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
shell: bash | ||
run: yarn build | ||
env: | ||
NEXT_PUBLIC_IS_E2E_TEST: true | ||
NEXT_PUBLIC_INFURA_KEY: ${{ secrets.NEXT_PUBLIC_INFURA_KEY }} | ||
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID }} | ||
THE_GRAPH_NETWORK_API_KEY: ${{ secrets.THE_GRAPH_NETWORK_API_KEY }} | ||
|
||
- name: Cache build artifacts | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
uses: actions/cache/save@v4 | ||
with: | ||
path: | | ||
./packages/arb-token-bridge-ui/build | ||
key: build-artifacts-${{ github.run_id }} |
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 |
---|---|---|
|
@@ -27,9 +27,14 @@ jobs: | |
- id: set-matrix | ||
run: echo "e2eFiles=$(node .github/workflows/formatSpecfiles.js ${{ inputs.test_type }} | jq . --compact-output)" >> $GITHUB_OUTPUT | ||
|
||
build: | ||
name: 'Build' | ||
uses: ./.github/workflows/build.yml | ||
secrets: inherit | ||
|
||
test-e2e: | ||
name: "Test E2E - ${{ matrix.test.name }}${{ matrix.test.type == 'orbit' && ' with L3' || ''}}" | ||
needs: [load-e2e-files] | ||
name: "Test E2E - ${{ matrix.test.name }} ${{ matrix.test.typeName }}" | ||
needs: [build, load-e2e-files] | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
|
@@ -69,13 +74,14 @@ jobs: | |
uses: OffchainLabs/actions/node-modules/install@main | ||
|
||
- name: Restore build artifacts | ||
uses: ./.github/actions/build-artifacts/restore | ||
uses: ./.github/actions/restore-build-artifacts | ||
|
||
- name: Install cypress | ||
run: yarn cypress install | ||
|
||
- name: Install linux dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install --no-install-recommends -y \ | ||
fluxbox \ | ||
xvfb | ||
|
@@ -91,15 +97,31 @@ jobs: | |
if: inputs.test_type != 'cctp' | ||
uses: OffchainLabs/actions/run-nitro-test-node@a20a76172ce524832ac897bef2fa10a62ed81c29 | ||
with: | ||
nitro-testnode-ref: aab133aceadec2e622f15fa438f6327e3165392d | ||
l3-node: ${{ matrix.test.type == 'orbit' }} | ||
no-l3-token-bridge: ${{ matrix.test.type != 'orbit' }} | ||
nitro-testnode-ref: badbcbea9b43d46e115da4d7c9f2f57c31af8431 | ||
l3-node: ${{ matrix.test.type != 'regular' }} | ||
no-l3-token-bridge: ${{ matrix.test.type == 'regular' }} | ||
args: >- | ||
${{ | ||
(matrix.test.type == 'orbit-eth') && '--l3node --l3-token-bridge' || | ||
(matrix.test.type == 'orbit-custom-6dec' && '--l3-fee-token --l3-fee-token-decimals 6') || | ||
(matrix.test.type == 'orbit-custom-18dec' && '--l3-fee-token') || | ||
(matrix.test.type == 'orbit-custom-20dec' && '--l3-fee-token --l3-fee-token-decimals 20') || | ||
'' | ||
}} | ||
- name: Run e2e tests via cypress-io/github-action | ||
uses: cypress-io/github-action@0da3c06ed8217b912deea9d8ee69630baed1737e # [email protected] | ||
with: | ||
start: yarn start | ||
command: "yarn test:e2e${{ (matrix.test.type == 'cctp' && ':cctp') || (matrix.test.type == 'orbit' && ':orbit') || '' }} --browser chrome" | ||
command: >- | ||
${{ | ||
(matrix.test.type == 'orbit-eth') && 'yarn test:e2e:orbit --browser chrome' || | ||
(matrix.test.type == 'orbit-custom-6dec' && 'yarn test:e2e:orbit:custom-gas-token --browser chrome') || | ||
(matrix.test.type == 'orbit-custom-18dec' && 'yarn test:e2e:orbit:custom-gas-token --browser chrome') || | ||
(matrix.test.type == 'orbit-custom-20dec' && 'yarn test:e2e:orbit:custom-gas-token --browser chrome') || | ||
(matrix.test.type == 'cctp' && 'yarn test:e2e:cctp --browser chrome') || | ||
'yarn test:e2e --browser chrome' | ||
}} | ||
wait-on: http://127.0.0.1:3000 | ||
wait-on-timeout: 120 | ||
spec: ./packages/arb-token-bridge-ui/tests/e2e/specs/* | ||
|
@@ -121,7 +143,7 @@ jobs: | |
uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: e2e-artifacts-${{ github.sha }}-${{ matrix.test.name }}-${{ (matrix.test.type == 'cctp' && 'cctp') || (matrix.test.type == 'orbit' && 'l3') || 'regular'}} | ||
name: e2e-artifacts-${{ github.sha }}-${{ matrix.test.name }}-${{ matrix.test.type }} | ||
path: | | ||
./packages/arb-token-bridge-ui/cypress/videos | ||
./packages/arb-token-bridge-ui/cypress/screenshots | ||
|
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
Oops, something went wrong.