-
Notifications
You must be signed in to change notification settings - Fork 72
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: use GH workflow for e2e test of create amplify #636
Changes from 6 commits
250c753
23e320a
910c682
fcc7e54
a7cb11b
827a51a
52ba97a
6e6fe30
f82dfe1
39b5811
c0b304a
065f589
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
'@aws-amplify/integration-tests': patch | ||
'create-amplify': patch | ||
--- | ||
|
||
- Support yarn, pnpm via env var | ||
- Add e2e test against yarn, pnpm |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,8 +18,11 @@ export class TsConfigInitializer { | |
private readonly existsSync = _existsSync, | ||
private readonly execa = _execa | ||
) {} | ||
private readonly executableName = | ||
process.env.PACKAGE_MANAGER_EXECUTABLE || 'npx'; // TODO: replace `process.env.PACKAGE_MANAGER_EXECUTABLE` with `getPackageManagerName()` once the test infra is ready. | ||
private readonly executableName = !process.env.PACKAGE_MANAGER_EXECUTABLE | ||
? 'npx' | ||
: process.env.PACKAGE_MANAGER_EXECUTABLE === 'yarn-stable' | ||
? 'yarn' | ||
: process.env.PACKAGE_MANAGER_EXECUTABLE; // TODO: replace `process.env.PACKAGE_MANAGER_EXECUTABLE` with `getPackageManagerName()` once the test infra is ready. | ||
Comment on lines
+21
to
+25
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. similar comment, here, it might be worth starting to package these things behind some abstraction. Keep env var as a mechanism, but figure out how rest of create-amplify is gonna interact with this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since my next step is to get rid of env var and use a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. On the branch, you decide when and how to take this suggestion (as well as the other one). |
||
|
||
/** | ||
* If tsconfig.json already exists, this is a noop. Otherwise, `npx tsc --init` is executed to create a tsconfig.json file | ||
|
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.
Not using ./.github/actions/setup_node because we want to use nodejs 19.
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.
Question:
Modern Yarn x Node 18/20 fails for yarnpkg/berry#4694 and yarnpkg/berry#5951 , so we use Node 19 in this PR.
However, Node 19 is already deprecated. I wonder if we should test Node 20 (exclude Modern Yarn) and Node 19 only for Modern Yarn? (We don't want to test all of them because that'd be too many combinations. e.g. 3 os x 3 package managers x 2 node version = 18)
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.
We shouldn't test against deprecated versions of node at all
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.
Modern Yarn only works with Node 19 for us 🙁 Do we want to say that we don't support Modern Yarn?
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.
that means node version should become part of test matrix.
Can yarn run on 20 ?
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.
That's fine but it means we need to be able [packagemanager, version] declararatively at some point to be flexible here.
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.
Yea, GH workflow matrix can do that. Let me update the PR
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.
We probably need some guidance from the product team about which versions of yarn we support. 4 versions seems like 2 too many :). Also, our unofficial policy is to target support for LTS node versions and not other versions.
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.
Yarn 2-4 are all modern yarn, which are similar and so different from yarn 2 that we need to treat yarn 1 and yarn 2+ as 2 different versions.
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.
For now we just test modern yarn + Node 19. We'll move to Node 20 once yarnpkg/berry#5961 is released.