-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #2106 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Updated configuration settings to ensure coverage data is treated independently for multiple components, improving accuracy in reports. - **New Features** - Enhanced the GitHub Actions workflow with directory specifications for Codecov uploads, clarifying the source of coverage reports. - Added new steps for uploading coverage reports for various components, ensuring distinct handling of each component's coverage. - Updated testing scripts to enable actual test execution and coverage reporting. - Created a new `receiveLoginData` function to manage login requests with structured logging for better traceability. - Introduced a new `MockNPSMessage` for easier unit testing and integration. - **Refactor** - Improved coverage configuration in the test settings by integrating default exclusions, allowing for better management of test coverage. - Simplified the test setup in `clientConnect.test.ts` by removing local state management and utilizing an external database session management function. - Corrected import paths across various modules to enhance maintainability and consistency. - Removed unnecessary mock functions to streamline testing strategy. - Restructured module organization for better clarity and maintainability. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
- Loading branch information
Showing
29 changed files
with
425 additions
and
526 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,33 +25,123 @@ jobs: | |
with: | ||
node-version: 22.x | ||
- name: Setup pnpm | ||
uses: pnpm/[email protected] | ||
uses: pnpm/[email protected] | ||
- name: Install and test | ||
run: | | ||
pnpm install | ||
make test | ||
env: | ||
CODECOV_UPLOAD_BUNDLE_TOKEN: ${{ secrets.CODECOV_UPLOAD_BUNDLE_TOKEN }} | ||
- name: Codecov | ||
- name: Codecov install cli | ||
if: ${{ always() }} # using always() to always run this step because i am uploading test results and coverage in one step | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
run: | | ||
pip install --user pytest | ||
pip install --user codecov-cli | ||
- name: Codecov create comit and report | ||
if: ${{ always() }} # using always() to always run this step because i am uploading test results and coverage in one step | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
run: | | ||
codecovcli --verbose create-commit --fail-on-error | ||
codecovcli --verbose create-report --fail-on-error | ||
- name: Codecov upload test results | ||
if: ${{ always() }} # using always() to always run this step because i am uploading test results and coverage in one step | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
run: | | ||
codecovcli do-upload --report-type test_results --file mcos.junit.xml | ||
codecovcli --verbose do-upload --fail-on-error --flag cli --name cli-${{ matrix.node-version }} | ||
codecovcli --verbose do-upload --fail-on-error --flag connection --name connection-${{ matrix.node-version }} | ||
codecovcli --verbose do-upload --fail-on-error --flag database --name database-${{ matrix.node-version }} | ||
codecovcli --verbose do-upload --fail-on-error --flag gateway --name gateway-${{ matrix.node-version }} | ||
codecovcli --verbose do-upload --fail-on-error --flag mcots --name mcots-${{ matrix.node-version }} | ||
codecovcli --verbose do-upload --fail-on-error --flag nps --name nps-${{ matrix.node-version }} | ||
codecovcli --verbose do-upload --fail-on-error --flag patch --name patch-${{ matrix.node-version }} | ||
codecovcli --verbose do-upload --fail-on-error --flag shard --name shard-${{ matrix.node-version }} | ||
codecovcli --verbose do-upload --fail-on-error --flag shared --name shared-${{ matrix.node-version }} | ||
codecovcli --verbose do-upload --fail-on-error --flag shared-packets --name shared-packets-${{ matrix.node-version }} | ||
- name: Codecov upload cli coverage | ||
if: ${{ always() }} # using always() to always run this step because i am uploading test results and coverage in one step | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
run: | | ||
codecovcli --verbose do-upload --fail-on-error --flag cli --name cli --dir packages/cli | ||
- name: Codecov upload connection coverage | ||
if: ${{ always() }} # using always() to always run this step because i am uploading test results and coverage in one step | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
run: | | ||
codecovcli --verbose do-upload --fail-on-error --flag connection --name connection --dir packages/connection | ||
- name: Codecov upload database coverage | ||
if: ${{ always() }} # using always() to always run this step because i am uploading test results and coverage in one step | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
run: | | ||
codecovcli --verbose do-upload --fail-on-error --flag database --name database --dir packages/database | ||
- name: Codecov upload gateway coverage | ||
if: ${{ always() }} # using always() to always run this step because i am uploading test results and coverage in one step | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
run: | | ||
codecovcli --verbose do-upload --fail-on-error --flag gateway --name gateway --dir packages/gateway | ||
- name: Codecov upload lobby coverage | ||
if: ${{ always() }} # using always() to always run this step because i am uploading test results and coverage in one step | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
run: | | ||
codecovcli --verbose do-upload --fail-on-error --flag lobby --name lobby --dir packages/lobby | ||
- name: Codecov upload login coverage | ||
if: ${{ always() }} # using always() to always run this step because i am uploading test results and coverage in one step | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
run: | | ||
codecovcli --verbose do-upload --fail-on-error --flag login --name login --dir packages/login | ||
- name: Codecov upload mcots coverage | ||
if: ${{ always() }} # using always() to always run this step because i am uploading test results and coverage in one step | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
run: | | ||
codecovcli --verbose do-upload --fail-on-error --flag mcots --name mcots --dir packages/mcots | ||
- name: Codecov upload nps coverageq | ||
if: ${{ always() }} # using always() to always run this step because i am uploading test results and coverage in one step | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
run: | | ||
codecovcli --verbose do-upload --fail-on-error --flag nps --name nps --dir packages/nps | ||
- name: Codecov upload patch coverage | ||
if: ${{ always() }} # using always() to always run this step because i am uploading test results and coverage in one step | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
run: | | ||
codecovcli --verbose do-upload --fail-on-error --flag patch --name patch --dir packages/patch | ||
- name: Codecov upload persona coverage | ||
if: ${{ always() }} # using always() to always run this step because i am uploading test results and coverage in one step | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
run: | | ||
codecovcli --verbose do-upload --fail-on-error --flag persona --name persona --dir packages/persona | ||
- name: Codecov upload sessions coverage | ||
if: ${{ always() }} # using always() to always run this step because i am uploading test results and coverage in one step | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
run: | | ||
codecovcli --verbose do-upload --fail-on-error --flag sessions --name sessions --dir packages/sessions | ||
- name: Codecov upload shard coverage | ||
if: ${{ always() }} # using always() to always run this step because i am uploading test results and coverage in one step | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
run: | | ||
codecovcli --verbose do-upload --fail-on-error --flag shard --name shard --dir packages/shard | ||
- name: Codecov upload shared coverage | ||
if: ${{ always() }} # using always() to always run this step because i am uploading test results and coverage in one step | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
run: | | ||
codecovcli --verbose do-upload --fail-on-error --flag shared --name shared --dir packages/shared | ||
- name: Codecov upload shared-packets coverage | ||
if: ${{ always() }} # using always() to always run this step because i am uploading test results and coverage in one step | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
run: | | ||
codecovcli --verbose do-upload --fail-on-error --flag shared-packets --name shared-packets --dir packages/shared-packets | ||
- name: Codecov upload transactions coverage | ||
if: ${{ always() }} # using always() to always run this step because i am uploading test results and coverage in one step | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
run: | | ||
codecovcli --verbose do-upload --fail-on-error --flag transactions --name transactions --dir packages/transactions | ||
- uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4 | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.