-
Notifications
You must be signed in to change notification settings - Fork 295
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: share e2e code with canary (#2299)
Fixes #2054 Refactoring so that CLI & Browser e2e tests share code from `end-to-end`
- Loading branch information
Showing
17 changed files
with
547 additions
and
833 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -308,4 +308,4 @@ | |
"inherits": "wasm" | ||
} | ||
] | ||
} | ||
} |
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,16 +1,29 @@ | ||
FROM node:18-alpine | ||
FROM 278380418400.dkr.ecr.us-east-2.amazonaws.com/yarn-project-base AS builder | ||
|
||
RUN apk update && apk add --no-cache udev ttf-freefont chromium curl jq bash | ||
ENV CHROME_BIN="/usr/bin/chromium-browser" PUPPETEER_SKIP_CHROMIUM_DOWNLOAD="true" | ||
|
||
ARG COMMIT_TAG="" | ||
ARG COMMIT_TAG="0.7.5" | ||
|
||
COPY . . | ||
|
||
# Setup & Build end-to-end package | ||
WORKDIR /usr/src/yarn-project/end-to-end | ||
|
||
# Extract canary @aztec dependencies | ||
RUN ../canary/scripts/extract_packages.sh ../canary/package.json > ./target_pkgs.txt | ||
# Update end-to-end dependencies with target version | ||
RUN ./scripts/setup_canary.sh $COMMIT_TAG ./target_pkgs.txt | ||
RUN rm ./target_pkgs.txt | ||
RUN yarn && yarn build | ||
|
||
#Build canary | ||
WORKDIR /usr/src/ | ||
COPY ./canary . | ||
# Build canary package | ||
WORKDIR /usr/src/yarn-project/canary | ||
RUN ./scripts/update_packages.sh $COMMIT_TAG | ||
RUN yarn && yarn build | ||
|
||
RUN cp node_modules/@aztec/aztec.js/dest/main.js src/web/ | ||
RUN cp node_modules/@aztec/circuits.js/resources/aztec3-circuits.wasm src/web/ | ||
# Copy web artifacts for browser test | ||
RUN cp ./node_modules/@aztec/aztec.js/dest/main.js src/web/ | ||
RUN cp ./node_modules/@aztec/circuits.js/resources/aztec3-circuits.wasm src/web/ | ||
|
||
ENTRYPOINT ["yarn", "test"] |
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,11 @@ | ||
#!/bin/bash | ||
|
||
FILE=$1 | ||
|
||
# Capture the output of the jq command in a Bash array | ||
mapfile -t TARGET_PKGS < <(jq -r '.dependencies | keys[] | select(startswith("@aztec/") and . != "@aztec/end-to-end")' $FILE) | ||
|
||
# Loop through the array and print each element on a new line | ||
for pkg in "${TARGET_PKGS[@]}"; do | ||
echo "$pkg" | ||
done |
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.