-
Notifications
You must be signed in to change notification settings - Fork 26
Add example project for karma #98
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
base: master
Are you sure you want to change the base?
Conversation
| - name: Run subset of tests | ||
| run: | | ||
| export KARMA_FILES=$(cat subset.txt | jq -R -s -c 'split("\n")[:-1]') | ||
| npx karma start --single-run No newline at end of 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.
Why do you run tests two times?
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.
First it runs all the tests. The second it runs just the subset. This also helps to make sure that subset file is formatted correctly.
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.
Do we need the first run, executing all tests? Can we change it to the usual workflow as follows?
record buildsubset- << Run the subset >>
record 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.
If not, I'd appreciate it if you could add the comment to your code regarding why the current flow is necessary.
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.
So for example, let's say subset returns foo.spec.js. Then we run just the subset (foo.spec.js), and record results. The problem in this case is that bar.spec.js will never be run, or recorded.
If the workflow steps are not clear, I can add a comment on top explaining the flow.
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.
So for example, let's say subset returns foo.spec.js. Then we run just the subset (foo.spec.js), and record results. The problem in this case is that bar.spec.js will never be run, or recorded.
Yes. That's the PTS, right? By reducing the number of running tests, we can reduce the execution time.
Add sample Karma project and GitHub workflow that record tests to https://app.launchableinc.com/organizations/launchableinc/workspaces/rocket-car-karma