Skip to content

Conversation

@hayemaxi
Copy link
Contributor

Problem: c8 was not given a reporter, therefore it defaulted to text which is the terminal.
Solution: Set it to lcov, which is what we have been using previously.

Note: More work may be needed on the .c8rc.json files. We might not need the one for core/ anymore. They may not be configured in the optimal way. Is it behaving how we want it to?


License: I confirm that my contribution is made under the terms of the Apache 2.0 license.

Problem: c8 was not given a reporter, therefore it defaulted to `text` which is the terminal.
Solution: Set it to `lcov`, which is what we have been using previously.

Note: More work may be needed on the .c8rc.json files. We might not need the one for core/ anymore. They may not be configured in the optimal way. Is it behaving how we want it to?
@hayemaxi hayemaxi requested a review from a team as a code owner October 18, 2024 18:56
Copy link
Contributor

@jpinkney-aws jpinkney-aws left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we run any tests at all from core anymore? If not, we would probably also need to update other codecov paths as well

"test": "npm run testCompile && c8 --allowExternal ts-node ../core/scripts/test/launchTest.ts unit dist/test/unit/index.js ../core/dist/src/testFixtures/workspaceFolder",
"testE2E": "npm run testCompile && c8 --allowExternal ts-node ../core/scripts/test/launchTest.ts e2e dist/test/e2e/index.js ../core/dist/src/testFixtures/workspaceFolder",
"testInteg": "npm run testCompile && c8 --allowExternal ts-node ../core/scripts/test/launchTest.ts integration dist/test/integ/index.js ../core/dist/src/testFixtures/workspaceFolder",
"test": "npm run testCompile && c8 --reporter lcov --allowExternal ts-node ../core/scripts/test/launchTest.ts unit dist/test/unit/index.js ../core/dist/src/testFixtures/workspaceFolder",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to manually add the flag if its already in the .c8rc.json? The only reason we had to do that for allowExternal was because it wasn't exposed in the c8rc

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought I had seen that amazonq also output the table, but it doesn't. It seems to work just fine with the c8rc. Thanks

@hayemaxi
Copy link
Contributor Author

Do we run any tests at all from core anymore? If not, we would probably also need to update other codecov paths as well

Which paths need updated? The only thing I can think of is deleting core's c8rc. Not sure if there would be side effects from this or if anything else needs updating. I figured I would leave this investigation for future work.

Copy link
Contributor

@jpinkney-aws jpinkney-aws left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the only other thing we would need to do is:

  1. delete core's .c8rc.json
  2. remove ./coverage/core/lcov.info instances in the ci (both github and codebuilds):

It looks like we future proofed ourselves and already upload toolkits lcov.info if it exists: https://github.com/aws/aws-toolkit-vscode/blob/master/.github/workflows/node.js.yml#L103

@hayemaxi
Copy link
Contributor Author

I will create an AI to address these

@hayemaxi hayemaxi merged commit f9e4124 into aws:master Oct 21, 2024
21 of 24 checks passed
tverney pushed a commit to tverney/aws-toolkit-vscode that referenced this pull request Oct 21, 2024
Problem: c8 was not given a reporter, therefore it defaulted to `text`
which is the terminal.
Solution: Set it to `lcov`, which is what we have been using previously.

Note: More work may be needed on the .c8rc.json files. We might not need
the one for core/ anymore. They may not be configured in the optimal
way. Is it behaving how we want it to?

---

<!--- REMINDER: Ensure that your PR meets the guidelines in
CONTRIBUTING.md -->

License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants