-
Notifications
You must be signed in to change notification settings - Fork 439
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' of github.com:safe-global/safe-wallet-web into rm-…
…pairing
- Loading branch information
Showing
99 changed files
with
1,676 additions
and
1,561 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 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,65 @@ | ||
# Copyright (c) HashiCorp, Inc. | ||
# SPDX-License-Identifier: MPL-2.0 | ||
|
||
name: 'Next.js Bundle Analysis' | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- dev | ||
|
||
permissions: | ||
contents: read # for checkout repository | ||
actions: read # for fetching base branch bundle stats | ||
pull-requests: write # for comments | ||
|
||
jobs: | ||
analyze: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install dependencies | ||
uses: ./.github/workflows/yarn | ||
|
||
- name: Build next.js app | ||
uses: ./.github/workflows/build | ||
with: | ||
secrets: ${{ toJSON(secrets) }} | ||
|
||
- name: Analyze bundle | ||
run: npx -p nextjs-bundle-analysis report | ||
|
||
- name: Upload bundle | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: bundle | ||
path: .next/analyze/__bundle_analysis.json | ||
|
||
- name: Download base branch bundle stats | ||
uses: dawidd6/action-download-artifact@v2 | ||
if: success() && github.event.number | ||
with: | ||
workflow: nextjs_bundle_analysis.yml | ||
branch: ${{ github.event.pull_request.base.ref }} | ||
path: .next/analyze/base | ||
|
||
- name: Compare with base branch bundle | ||
if: success() && github.event.number | ||
run: ls -laR .next/analyze/base && npx -p nextjs-bundle-analysis compare | ||
|
||
- name: Get Comment Body | ||
id: get-comment-body | ||
if: success() && github.event.number | ||
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings | ||
run: | | ||
echo "body<<EOF" >> $GITHUB_OUTPUT | ||
echo "$(cat .next/analyze/__bundle_analysis_comment.txt)" >> $GITHUB_OUTPUT | ||
echo EOF >> $GITHUB_OUTPUT | ||
- name: Comment | ||
uses: marocchino/sticky-pull-request-comment@v2 | ||
with: | ||
header: next-bundle-analysis | ||
message: ${{ steps.get-comment-body.outputs.body }} |
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,45 @@ | ||
name: Regression on demand tests | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
e2e: | ||
runs-on: ubuntu-20.04 | ||
name: Cypress Regression on demand tests | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
containers: [1, 2, 3, 4, 5] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: ./.github/workflows/yarn | ||
|
||
- name: Install Cypress | ||
run: | | ||
./node_modules/.bin/cypress install | ||
- uses: ./.github/workflows/build | ||
with: | ||
secrets: ${{ toJSON(secrets) }} | ||
e2e_mnemonic: ${{ secrets.NEXT_PUBLIC_CYPRESS_MNEMONIC }} | ||
|
||
- name: Serve | ||
run: yarn serve & | ||
|
||
- uses: cypress-io/github-action@v4 | ||
with: | ||
parallel: true | ||
spec: cypress/e2e/**/*.cy.js | ||
browser: chrome | ||
record: true | ||
config: baseUrl=http://localhost:8080 | ||
group: 'Regression on demand tests' | ||
env: | ||
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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: Regression tests | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- 'release**' | ||
- 'release/**' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
e2e: | ||
runs-on: ubuntu-20.04 | ||
name: Cypress Regression tests | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
containers: [1, 2, 3] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: ./.github/workflows/yarn | ||
|
||
- name: Install Cypress | ||
run: | | ||
./node_modules/.bin/cypress install | ||
- uses: ./.github/workflows/build | ||
with: | ||
secrets: ${{ toJSON(secrets) }} | ||
e2e_mnemonic: ${{ secrets.NEXT_PUBLIC_CYPRESS_MNEMONIC }} | ||
|
||
- name: Serve | ||
run: yarn serve & | ||
|
||
- uses: cypress-io/github-action@v4 | ||
with: | ||
parallel: true | ||
spec: cypress/e2e/**/*.cy.js | ||
browser: chrome | ||
record: true | ||
config: baseUrl=http://localhost:8080 | ||
group: 'Regression tests' | ||
env: | ||
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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
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 |
---|---|---|
@@ -1,34 +1,21 @@ | ||
FROM node:18-alpine AS base | ||
ENV NEXT_TELEMETRY_DISABLED 1 | ||
|
||
FROM base AS builder | ||
|
||
FROM node:18-alpine | ||
RUN apk add --no-cache libc6-compat git python3 py3-pip make g++ libusb-dev eudev-dev linux-headers | ||
WORKDIR /app | ||
|
||
# Install dependencies | ||
COPY package.json yarn.lock* ./ | ||
RUN yarn --frozen-lockfile | ||
COPY . . | ||
RUN yarn run after-install | ||
|
||
RUN yarn build | ||
|
||
# Production image | ||
FROM base AS runner | ||
WORKDIR /app | ||
# install deps | ||
RUN yarn install --frozen-lockfile | ||
RUN yarn after-install | ||
|
||
ENV NODE_ENV production | ||
ENV REVERSE_PROXY_UI_PORT 8080 | ||
|
||
RUN addgroup --system --gid 1001 nodejs && adduser --system --uid 1001 nextjs | ||
COPY --from=builder /app/out ./out | ||
|
||
# Set the correct permission for prerender cache | ||
RUN mkdir .next && chown nextjs:nodejs .next | ||
# Next.js collects completely anonymous telemetry data about general usage. | ||
# Learn more here: https://nextjs.org/telemetry | ||
# Uncomment the following line in case you want to disable telemetry during the build. | ||
ENV NEXT_TELEMETRY_DISABLED 1 | ||
|
||
USER nextjs | ||
EXPOSE 3000 | ||
|
||
EXPOSE ${REVERSE_PROXY_UI_PORT} | ||
ENV PORT 3000 | ||
|
||
CMD npx -y serve out -p ${REVERSE_PROXY_UI_PORT} | ||
CMD ["yarn", "static-serve"] |
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.
Oops, something went wrong.