-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Allow task log prefixing in Github Actions #5994
Changes from 2 commits
7d89e86
416d0b9
b67a7e4
1bf87a2
b2073bf
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 | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -33,6 +33,36 @@ because otherwise prysk interprets them as multiline commands | |||||||
Cached: 0 cached, 2 total | ||||||||
Time:\s*[\.0-9]+m?s (re) | ||||||||
|
||||||||
# Build as if we are in Github Actions with a task log prefix. | ||||||||
$ export GITHUB_ACTIONS=1 | ||||||||
$ ${TURBO} run build --force --log-prefix="task" | ||||||||
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.
Suggested change
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. Should I apply this to the preceding test? Also if I'm not mistaken don't these Another thing: by passing the filter it won't run the two tasks - do we care to have two tasks or is it ok to just test that a single task has the prefix? 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. +1 to the 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.
single task is fine IMO
generally, I wouldn't change unrelated, existing code. That has a tendency to balloon the diff and make git history harder to follow (not to mention it might cause unexpected issues and sink your time). In this case, 🤷🏾 |
||||||||
\xe2\x80\xa2 Packages in scope: my-app, util (esc) | ||||||||
\xe2\x80\xa2 Running build in 2 packages (esc) | ||||||||
\xe2\x80\xa2 Remote caching disabled (esc) | ||||||||
::group::my-app:build | ||||||||
my-app:build: cache bypass, force executing 4c3a4e8d472d74b2 | ||||||||
my-app:build: | ||||||||
my-app:build: > build | ||||||||
my-app:build: > echo 'building' && sleep 1 && echo 'done' | ||||||||
my-app:build: | ||||||||
my-app:build: building | ||||||||
my-app:build: done | ||||||||
::endgroup:: | ||||||||
::group::util:build | ||||||||
util:build: cache bypass, force executing 90d7154e362e3386 | ||||||||
util:build: | ||||||||
util:build: > build | ||||||||
util:build: > sleep 0.5 && echo 'building' && sleep 1 && echo 'completed' | ||||||||
util:build: | ||||||||
util:build: building | ||||||||
util:build: completed | ||||||||
::endgroup:: | ||||||||
|
||||||||
Tasks: 2 successful, 2 total | ||||||||
Cached: 0 cached, 2 total | ||||||||
Time:\s*[\.0-9]+m?s (re) | ||||||||
|
||||||||
|
||||||||
Verify that errors are grouped properly | ||||||||
$ ${TURBO} run fail | ||||||||
\xe2\x80\xa2 Packages in scope: my-app, util (esc) | ||||||||
|
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 can drop this since it's set on line 8
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.
Probably my unfamiliarity with the
.t
files, but I thought that that export was just for the test it was running in. Can any single test do changes to subsequent tests (in this case, doing theexport
affecting all other tests)?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.
Prysk runs each file in a new shell, so they're not localized per-test. The way these comparisons work it:
$
-prefixed ones.If you ever get a failing test it pops out a
.t.err
file which you can just diff with the.t
file. It's ... primitive? But has saved us enough times to be worth dealing with bad regex ergonomics, a Python toolchain, and other quirks.