-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Will Cory
authored and
Will Cory
committed
Sep 11, 2023
1 parent
9b77904
commit 12305a0
Showing
16 changed files
with
7,697 additions
and
4,344 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
node_modules | ||
**/node_modules | ||
lib/**/dist | ||
apps/**/dist | ||
packages/**/dist | ||
.env | ||
.vscode | ||
forge-artifacts | ||
cache | ||
**/.env | ||
target |
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,44 @@ | ||
FROM node:18.12.1-bullseye as monorepo | ||
|
||
ENV PATH "$PATH:/root/.foundry/bin" | ||
ENV NX_DAEMON=false | ||
|
||
# Add the Foundry CLI to the PATH and do a quick test to make sure it's installed to path | ||
RUN curl -L https://foundry.paradigm.xyz | bash && \ | ||
foundryup && \ | ||
forge --version && \ | ||
anvil --version && \ | ||
cast --version && \ | ||
npm install -g [email protected] | ||
|
||
WORKDIR /monorepo | ||
|
||
# Copy manifest files into the image in | ||
# preparation for `yarn install`. | ||
COPY pnpm-workspace.yaml pnpm-lock.yaml .nvmrc ./ | ||
|
||
# install all dependencies | ||
RUN pnpm fetch | ||
|
||
# copy rest of repo and buildd | ||
COPY . . | ||
|
||
# build all apps and packages | ||
RUN pnpm install --frozen-lockfile && pnpm nx run-many --target=build:dist | ||
|
||
CMD ["pnpm", "all"] | ||
|
||
# @evmts/example-next | ||
# FROM nginx:stable-alpine as example-next | ||
# COPY --from=monorepo /monorepo/examples/next/dist /usr/share/nginx/html | ||
# COPY apps/ts-sol-playground/nginx.conf /etc/nginx/conf.d/default.conf | ||
# EXPOSE 80 | ||
# CMD ["nginx", "-g", "daemon off;"] | ||
|
||
# @evmts/example-vite | ||
FROM nginx:stable-alpine as example-vite | ||
COPY --from=monorepo /monorepo/examples/vite/dist /usr/share/nginx/html | ||
COPY examples/vite/nginx.conf /etc/nginx/conf.d/default.conf | ||
EXPOSE 80 | ||
CMD ["nginx", "-g", "daemon off;"] | ||
|
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 @@ | ||
version: '3.8' | ||
|
||
services: | ||
anvil: | ||
image: monorepo:latest | ||
build: | ||
context: . | ||
target: monorepo | ||
command: | ||
[ | ||
"anvil", | ||
"--port", | ||
"8546", | ||
"--fork-url", | ||
"${ANVIL_FORK_URL_1}" | ||
] | ||
environment: | ||
- ANVIL_IP_ADDR=0.0.0.0 | ||
- ANVIL_FORK_URL_1=${ANVIL_FORK_URL_1} | ||
ports: | ||
- 8546:8546 | ||
healthcheck: | ||
test: cast block-number --rpc-url http://0.0.0.0:8546 | ||
|
||
example-vite: | ||
image: example-vite:latest | ||
build: | ||
context: . | ||
target: example-vite | ||
args: | ||
VITE_RPC_URL_1: "http://anvil:8546" | ||
VITE_RPC_URL_420: "https://goerli.optimism.io" | ||
environment: | ||
- PORT=5173 | ||
- HOST="0.0.0.0" | ||
ports: | ||
- 5173:80 | ||
healthcheck: | ||
test: wget localhost:80 -q -O - > /dev/null 2>&1 | ||
|
||
e2e: | ||
image: e2e:latest | ||
build: | ||
context: e2e | ||
environment: | ||
- PLAYWRIGHT_BASE_URL=http://example-vite:5173 | ||
- PLAYWRIGHT_SLOW_MO=0 | ||
- PLAYWRIGHT_METAMASK_VERSION=10.25.0 | ||
- CI=true | ||
- PLAYWRIGHT_HEADLESS_MODE=0 | ||
- PLAYWRIGHT_PRIVATE_KEY="test test test test test test test test test test test junk" | ||
- PLAYWRIGHT_CHAIN_ID=1 | ||
- PLAYWRIGHT_RPC_URL=http://anvil:8546 | ||
depends_on: | ||
anvil: | ||
condition: service_healthy | ||
example-vite: | ||
condition: service_healthy | ||
volumes: | ||
- type: bind | ||
source: ./e2e/playwright-report | ||
target: /e2e/playwright-report | ||
- type: bind | ||
source: ./e2e/test-results | ||
target: /e2e/test-results |
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 @@ | ||
node_modules | ||
lib/**/node_modules | ||
lib/**/dist | ||
apps/**/node_modules | ||
apps/**/dist | ||
packages/**/node_modules | ||
packages/**/dist | ||
.env | ||
.vscode | ||
forge-artifacts | ||
cache | ||
**/.env | ||
target |
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,18 @@ | ||
FROM mcr.microsoft.com/playwright:v1.37.1-jammy | ||
|
||
ENV PATH "$PATH:/root/.foundry/bin" | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
&& npm install -g [email protected] | ||
|
||
WORKDIR /monorepo | ||
|
||
COPY pnpm-lock.yaml package.json ./ | ||
|
||
RUN pnpm install --frozen-lockfile | ||
|
||
COPY . . | ||
|
||
ENV NODE_ENV=production | ||
|
||
CMD ["pnpm", "e2e:ci"] |
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
Oops, something went wrong.