-
Notifications
You must be signed in to change notification settings - Fork 266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: share e2e code with canary #2299
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
68ff09b
WIP refactoring canary tests to re-use e2e code
spypsy c77e531
merge with master
spypsy 15db89b
remove all non-canary files to build e2e
spypsy 18d2c05
working CLI e2e & canary test
spypsy 00cf5e9
remove ARG value
spypsy 16baa93
browser test shared code
spypsy f08735d
Merge branch 'master' into spy/canary-common-code
spypsy aa9fe7e
revert dockerfile dev change
spypsy fc1088d
Merge branch 'spy/canary-common-code' of github.com:AztecProtocol/azt…
spypsy d621a0b
move comment to test location
spypsy b6e49ee
merge with master
spypsy 4a80a4a
merge with master
spypsy 222eaf0
merge conflicts
spypsy f8c500d
WIP get canary @aztec packages programmatically
spypsy 230d68f
programmatically get canary packages
spypsy 33b0894
Fix node_modules reference
spypsy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@spypsy Should this have a default value? Or should it have an invalid default value so we catch the case where COMMIT_TAG isn't being provided?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, it's better to hardcode an invalid tag so it fails with a logged error.
Fixed here: https://github.com/AztecProtocol/aztec-packages/pull/2371/files