-
Notifications
You must be signed in to change notification settings - Fork 85
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
Use binaries for CI testing 😋 #1196
Conversation
Signed-off-by: zFernand0 <[email protected]>
Codecov Report
@@ Coverage Diff @@
## next #1196 +/- ##
=======================================
Coverage 91.67% 91.67%
=======================================
Files 356 356
Lines 5478 5478
Branches 773 773
=======================================
Hits 5022 5022
Misses 451 451
Partials 5 5 Continue to review full report at Codecov.
|
Signed-off-by: Timothy Johnson <[email protected]>
37f82cc
to
54d02c5
Compare
54d02c5
to
a62b570
Compare
Signed-off-by: zFernand0 <[email protected]>
a62b570
to
ec2034b
Compare
Signed-off-by: zFernand0 <[email protected]>
51356f4
to
361fb8d
Compare
Signed-off-by: zFernand0 <[email protected]>
Signed-off-by: zFernand0 <[email protected]>
The |
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.
Just a couple of questions to complete my understanding. I am NOT requesting any changes.
|
||
`0.` The first time it will likely take ~3 minutes to run. Subsequent runs (with `--reuse`) should take less than 2 minutes. <br/> | ||
`1.` Artifact upload and download doesn't work on `nektos/act` (hence why we need to copy the zowe.tgz to a shared Docker volume). <br/> | ||
`2.` `nektos/act` only works with linux distros. <br/> |
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.
Nektos/act doc implies that it runs on windows. Is your statement due to the fact that nektos/act only hosts Linux docker images?
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 right, I will rephrase that statement 👍
It should work fine on Windows, Linux, MacOS, and almost everywhere you can have Docker (e.g. Raspberry PI - armv7l) 😋
.github/workflows/zowe-cli.yml
Outdated
- name: Setup Binary in PATH | ||
if: github.event.inputs.test-type == "binary" | ||
id: setup-binary | ||
run: tar -xvzf zowe.tgz -C ./node_modules/.bin --overwrite |
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.
Should ./node_modules/.bin also be the location that the "zowe config daemon" command puts the zowe executable at a customer site?
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.
I don't think ./node_modules/.bin
will work for end users since the where/which zowe
location depends on their installation/configuration of node and npm, e.g. using nvm.
For example:
/root/.nvm/versions/node/v16.12.0/bin/zowe
C:\Users\USER\scoop\apps\nvm\current\nodejs\nodejs\zowe
C:\Users\USER\AppData\Roaming\npm\zowe
Maybe something along the lines of "${process.env.ZOWE_CLI_HOME}/_bin"
or "~/.zowe/_bin")
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.
Thanks. Makes sense. Many customers may not even have the privilege to write to those NodeJS locations when they run the "zowe config daemon" command.
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.
Note:
The location where we place the binary changed from ./node_modules/.bin
to ./__tests__/__resources__/application_instances
becuase of the TestEnvironment.setUp
function. (see below)
result.env.PATH = `${nodePath.resolve(__dirname, "../../__resources__/application_instances")}${separator}${process.env.PATH}`; |
Signed-off-by: zFernand0 <[email protected]>
Signed-off-by: zFernand0 <[email protected]>
Even though zowe-cli/.github/workflows/zowe-cli.yml Lines 21 to 24 in c746e43
|
Signed-off-by: zFernand0 <[email protected]>
Signed-off-by: zFernand0 <[email protected]>
Signed-off-by: zFernand0 <[email protected]>
Signed-off-by: zFernand0 <[email protected]>
Note: Which means that the setup-binary step will need to be changed back to modifying the path instead of relying on the run: |
mkdir -p $HOME/.zowe/_bin
tar -xvzf zowe.tgz -C $HOME/.zowe/_bin
echo "$HOME/.zowe/_bin" >> $GITHUB_PATH |
…by the integration tests Signed-off-by: zFernand0 <[email protected]>
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.
@zFernand0 Thanks for addressing all of my feedback related to the test:act
script 🙂
Left a minor comment below, also I'm still having issues with using nektos/act
locally 😢 Lots of integration tests fail with an error like the following:
Expected: ""
Received: "/mnt/c/Users/XXX/Projects/zowe-next/zowe-cli/packages/cli/__tests__/zostso/__integration__/issue/__scripts__/issue_help.sh: 2: set: Illegal option -·
"
Based on some Google searching, the error set: Illegal option -·
seems to be caused by Bash scripts using Windows line endings (CRLF) instead of Unix ones (LF). I believe what is happening is that on my local machine, the Bash scripts are checked out with CRLF line endings, and then they're getting copied into the Ubuntu Docker container.
Curious what solution you would suggest here - should I change Git settings on my Windows machine to check out files with Unix line endings, or is there an easy way we can convert the line endings when files are copied into the Docker container?
Signed-off-by: zFernand0 <[email protected]>
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.
LGTM! Moved my comment above to #1210 so that it can be addressed separately instead of holding up this PR 🙂
Kudos, SonarCloud Quality Gate passed! |
Things included here:
nektos/act
Issues fixed:
Known Test Failures:
stderr
will fail.Daemon Mode - Erros from the daemon are not forwarded through STDERR #1195
Daemon Mode - Socket connection error after every command [Mac-only] #1192