Skip to content
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

NoMongo: Restore Test CodeCov GitHub Action to the develop-postgres branch #2854

Closed
palisadoes opened this issue Jan 13, 2025 · 38 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@palisadoes
Copy link
Contributor

palisadoes commented Jan 13, 2025

Describe the bug

  1. We cannot view our current CodeCov statistics as the feature was not added to the new develop-postgres branch.
  2. We are using biome in the develop-postgres branch.
  3. We were using vite in the develop branch. The develop GitHub action file can be found here:
    1. https://github.com/PalisadoesFoundation/talawa-api/blob/develop/.github/workflows/pull-request.yml
  4. The feature needs to be restored

To Reproduce
Steps to reproduce the behavior:

  1. Visit:
    1. https://app.codecov.io/gh/PalisadoesFoundation/talawa-api
  2. There are no statistics for the develop-postgres

Expected behavior

  1. Visit:
    1. https://app.codecov.io/gh/PalisadoesFoundation/talawa-api
  2. There are statistics for the develop-postgres

Actual behavior

  • See above

Screenshots

  • N/A

Additional details

Related Issues:

Potential internship candidates

Please read this if you are planning to apply for a Palisadoes Foundation internship

Reference PR:

@palisadoes
Copy link
Contributor Author

@varshith257 PTAL

@VanshikaSabharwal
Copy link

@palisadoes can you please assign this issue to me

@Cioppolo14 Cioppolo14 removed the unapproved Unapproved for Pull Request label Jan 15, 2025
@varshith257
Copy link
Member

@VanshikaSabharwal You can take look at the reference PR I have done for admin

@VanshikaSabharwal
Copy link

VanshikaSabharwal commented Jan 15, 2025

Yes @varshith257 I'll check it out.

@VanshikaSabharwal
Copy link

@varshith257 Can you please share link of that PR.

@palisadoes
Copy link
Contributor Author

@VanshikaSabharwal
Copy link

@palisadoes @varshith257 is the name assigned to secrets here correct?
(CODECOV_UNIQUE_NAME, CODECOV_TOKEN)

Image

@palisadoes
Copy link
Contributor Author

Yes

@github-project-automation github-project-automation bot moved this from Backlog to Done in NoMongo: Talawa-API Jan 20, 2025
@palisadoes palisadoes reopened this Jan 20, 2025
@github-project-automation github-project-automation bot moved this from Done to Backlog in NoMongo: Talawa-API Jan 20, 2025
@palisadoes
Copy link
Contributor Author

@VanshikaSabharwal

This has to be reopened. I just remembered that CodeCov data will not be sent to the CodeCov website until the post merge push.

This was done in the push.yml file in the develop branch before. Similar capabilities will need to be added to the develop-postgres branch.

Use this as an example

@VanshikaSabharwal
Copy link

Okay @palisadoes i am doing it

@palisadoes
Copy link
Contributor Author

palisadoes commented Jan 23, 2025

@VanshikaSabharwal
Copy link

Hi @palisadoes, the push failed because pnpm was not installed on the CI runner. I have now updated the workflow to include the installation of pnpm before running the tests. I will submit another PR to resolve this.

Thanks for your patience!

@VanshikaSabharwal VanshikaSabharwal mentioned this issue Jan 23, 2025
6 tasks
@VanshikaSabharwal VanshikaSabharwal mentioned this issue Jan 24, 2025
6 tasks
@palisadoes
Copy link
Contributor Author

palisadoes commented Jan 24, 2025

  1. It continues to fail. Please try again
    1. https://github.com/PalisadoesFoundation/talawa-api/actions/runs/12957619341/job/36146495002
  2. Why are you using this approach to run tests versus the tried and true method in the pull request file?
    1. https://github.com/PalisadoesFoundation/talawa-api/blob/develop-postgres/.github/workflows/pull-request.yml

This is taking too much time. 5 unsuccessful PRs. I'm going to have to assign this to someone else.

@palisadoes
Copy link
Contributor Author

Unassigning.

@bandhan-majumder
Copy link

can i work on this

@palisadoes
Copy link
Contributor Author

@bandhan-majumder I spoke to @VanshikaSabharwal and there may be a solution. I'm going to reassign it back.

@VanshikaSabharwal
Copy link

Is this issue resolved @palisadoes

@palisadoes
Copy link
Contributor Author

Yes. Thanks

@github-project-automation github-project-automation bot moved this from Backlog to Done in NoMongo: Talawa-API Jan 26, 2025
@palisadoes
Copy link
Contributor Author

We now need to create issues to test the code base:

https://app.codecov.io/gh/PalisadoesFoundation/talawa-api/tree/develop-postgres/src?displayType=list

@bandhan-majumder
Copy link

can i help creating test issues @palisadoes

@palisadoes
Copy link
Contributor Author

palisadoes commented Jan 26, 2025

@bandhan-majumder

  1. Here is a sample issue:
    1. Tests: src/resolvers/Mutation/createAdvertisement.ts #2220
  2. Make reference to this link instead as it points to the new develop-postgres branch
    1. https://app.codecov.io/gh/PalisadoesFoundation/talawa-api/tree/develop-postgres/src?displayType=list
  3. We only need tests for the src/graphql directory for files with < 90% code coverage. Only do:
    1. Mutations
    2. Queries

It's a lot of work. You are going to need help

@bandhan-majumder
Copy link

bandhan-majumder commented Jan 26, 2025

I can do it. What about creating a template instead? Should I add a test issue template? @palisadoes
does this look good?

Image

@palisadoes
Copy link
Contributor Author

palisadoes commented Jan 26, 2025

  1. It'll be faster to only mention the file in the title and have a generic body linking here:
    1. https://app.codecov.io/gh/PalisadoesFoundation/talawa-api/tree/develop-postgres/src?displayType=list
  2. Here is an example from Admin
    1. Improve Code Coverage in src/components/UserPortal/Register/Register.tsx talawa-admin#3074

Ask for help. If it's split up with 4-5 people it will be even faster

@VanshikaSabharwal
Copy link

Yes @palisadoes you are right

@VanshikaSabharwal
Copy link

We can work together on this issue @bandhan-majumder

@bandhan-majumder
Copy link

bandhan-majumder commented Jan 26, 2025

yes. just wait I am adding an issue template so it becomes easier to create test issue @VanshikaSabharwal

@VanshikaSabharwal
Copy link

And @palisadoes i think i have opened these type of test coverage issues

@VanshikaSabharwal
Copy link

yes. just wait I am adding an issue template so it becomes easier to create test issue @VanshikaSabharwal

Yes @bandhan-majumder i created tests before as well. And @palisadoes made template that time. So we can use that template. It'll be easier and better this way.

@VanshikaSabharwal
Copy link

So @bandhan-majumder Do you want me to share that template created by @palisadoes before for test coverage issue?

@bandhan-majumder
Copy link

bandhan-majumder commented Jan 26, 2025

please go through the conversation above. @palisadoes provided a template. following that

@VanshikaSabharwal
Copy link

VanshikaSabharwal commented Jan 26, 2025

please go through the conversation above. @palisadoes provided a template. following that

Okkay gotcha great. I was talking abt same template

@VanshikaSabharwal
Copy link

@bandhan-majumder I think we can communicate better on slack. Once you have created the template we should discuss further on slack i think

@bandhan-majumder
Copy link

bandhan-majumder commented Jan 26, 2025

Waiting for my PR to get merged in main to make it accessible for issue creators. Currently it's merge into develop, not visible to issue creators. @VanshikaSabharwal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

5 participants