-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add E2E tests for pre-releases #150
Merged
Merged
Changes from 11 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
c0abe51
ci: add e2e release buildspec
TheUnderScorer 8299621
build: update engine
TheUnderScorer 4280658
ci: update paths
TheUnderScorer 0fa68ba
ci: download tag by commit id
TheUnderScorer c8e9422
chore: add missing token param
TheUnderScorer 6c2aebd
chore: fix install paths
TheUnderScorer 1bcc41e
chore: fix path
TheUnderScorer eb7c5ec
ci: use correct commit id
TheUnderScorer 54e0611
ci: add shared PR actions
TheUnderScorer 5921f29
build: change release commit message
TheUnderScorer 999c7b4
ci: simplify pr action
TheUnderScorer 991cba7
ci: change test branch to rc
TheUnderScorer 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Create PR | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
create-pr: | ||
name: Create PR | ||
uses: fingerprintjs/dx-team-toolkit/.github/workflows/create-pr.yml@v1 | ||
with: | ||
target_branch: ${{ github.event.release.prerelease && 'main' || 'test' }} | ||
tag_name: ${{ github.event.release.tag_name }} | ||
prerelease: ${{ github.event.release.prerelease }} |
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,56 @@ | ||
version: 0.2 | ||
env: | ||
secrets-manager: | ||
GITHUB_TOKEN: "fpjs-dev-cloudfront-secrets:GITHUB_TOKEN" | ||
phases: | ||
install: | ||
commands: | ||
- echo $COMMIT_ID | ||
- echo $CODEBUILD_SOURCE_VERSION | ||
- echo $CODEBUILD_BUILD_ID | ||
- echo $CODEBUILD_PUBLIC_BUILD_URL | ||
- | | ||
curl \ | ||
-X POST \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: Bearer $GITHUB_TOKEN"\ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
https://api.github.com/repos/fingerprintjs/fingerprint-pro-cloudfront-integration/statuses/$COMMIT_ID \ | ||
-d "{\"state\":\"pending\",\"target_url\":\"https://us-east-1.console.aws.amazon.com/codesuite/codebuild/708050157146/projects/fpjs-dev-cloudfront-lambda-e2e-tests/build/$CODEBUILD_BUILD_ID/?region=us-east-1\",\"description\":\"E2E tests for release are running\",\"context\":\"e2e-release\"}" | ||
- ls -a | ||
- curl -fsSL https://get.pulumi.com | sh | ||
- export PATH=$PATH:$HOME/.pulumi/bin | ||
- pulumi version | ||
- yarn install | ||
- yarn install --cwd=e2e/infra | ||
- yarn install --cwd=e2e/website | ||
- yarn install --cwd=e2e/tests | ||
- cd e2e/tests && npx playwright install --with-deps && cd ../.. | ||
- UNPACK_TO_DIST=true node scripts/downloadGithubRelease.mjs | ||
pre_build: | ||
commands: | ||
- pwd | ||
- pulumi version | ||
- cd e2e/website && yarn build && cd ../.. | ||
- cd e2e/infra/lambda && pulumi stack init e2e && pulumi stack select e2e && cd ../../.. | ||
- cd e2e/infra/cloudfront && pulumi stack init e2e && pulumi stack select e2e && cd ../../.. | ||
- cd e2e/infra && yarn lambda:up && yarn lambda:export && yarn cloudfront:up && yarn cloudfront:export && cd ../.. | ||
build: | ||
commands: | ||
- ls -a | ||
- cd e2e/tests && yarn test | ||
finally: | ||
- cd ../.. | ||
- echo $CODEBUILD_BUILD_SUCCEEDING | ||
- echo $COMMIT_ID | ||
- export STATUS=$(sh ./scripts/get-codebuild-status.sh) | ||
- echo $STATUS | ||
- | | ||
curl \ | ||
-X POST \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: Bearer $GITHUB_TOKEN"\ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
https://api.github.com/repos/fingerprintjs/fingerprint-pro-cloudfront-integration/statuses/$COMMIT_ID \ | ||
-d "{\"state\":\"$STATUS\",\"target_url\":\"https://us-east-1.console.aws.amazon.com/codesuite/codebuild/708050157146/projects/fpjs-dev-cloudfront-lambda-e2e-tests/build/$CODEBUILD_BUILD_ID/?region=us-east-1\",\"description\":\"E2E tests for release finished\",\"context\":\"e2e-release\"}" | ||
- cd e2e/infra && yarn cloudfront:destroy && yarn lambda:destroy && cd ../.. |
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
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.
Because of the
adm-zip
I had to change the engine.I think that we can leave it as it is, and also consider bumping the lambda@edge runtime to node 18 at some point.