ubsuny / 23-Homework4G4

MIT License
0 stars 10 forks source link

Issue in workflow #49

Open poojashresthacode opened 11 months ago

poojashresthacode commented 11 months ago

Hi @pratibha77118 @WildJimmy, I created a workflow for linting the unit test. Then I renamed the Python file of the unit test and made the required changes in the workflow file of the linting unit test too. It was good yesterday. But, now again It is showing some error while running the workflow. The error mentions that the old .py file of unit test is not found, even though I have made sufficient changes in the workflow related to the name of the py file.

poojashresthacode commented 11 months ago

This problem is now sorted. But I have another problem. https://github.com/poojashresthacode/23-Homework4G4/actions/runs/6549160509/job/17785468333 The status of the GitHub action is failed. But, inside when you click the link, it shows the outcome and also rates our code, which is what it is for. Does this mean that our workflow is working?

@laserlab, Please have a look at it.

laserlab commented 11 months ago

If you google plying exit codes (that the output of pylint) it shows:

exit code meaning
0 no error
1 fatal message issued
2 error message issued
4 warning message issued
8 refactor message issued
16 convention message issued
32 usage error

So that is to be expected for errors related to convention (which is what you’re looking for)

So all good

poojashresthacode commented 11 months ago

Thank you for the clarification professor.

But, I am confused here.

https://github.com/poojashresthacode/23-Homework4G4/actions/runs/6550041543/job/17788281690 So, in the link that I have attached right now, the workflow is working fine, but when I click the run Python script, there is an error message that mentions that test_calculate_periodic_time is not defined, which I have already defined in https://github.com/poojashresthacode/23-Homework4G4/blob/module_unit_test/module_file.py this module file. Does it mean that the module is not working? @

poojashresthacode commented 11 months ago

@laserlab please have a look at it.

laserlab commented 11 months ago

What exactly do you want python final_code.py to do? This will execute your code. Is that what you want? This does not run the unit tests.

reshnashrestha commented 11 months ago

Yeah, @poojashresthacode I checked your mentioned yml file and that is for running python, that fie is not for unit test. In that case you can discard unit test file from the workflow file. There is nothing to worry.

poojashresthacode commented 11 months ago

Got it professor. Thankyou.

Thankyou @reshnashrestha

tirthbha commented 11 months ago

This problem is now sorted. But I have another problem. https://github.com/poojashresthacode/23-Homework4G4/actions/runs/6549160509/job/17785468333 The status of the GitHub action is failed. But, inside when you click the link, it shows the outcome and also rates our code, which is what it is for. Does this mean that our workflow is working?

@laserlab, Please have a look at it.

@poojashresthacode Use "|| exit 0" just after the .py file name, it will fix the github action issue.

poojashresthacode commented 11 months ago

So you mean to say in workflow file? Yes, I have done that. need to do a pull request.

laserlab commented 11 months ago

It depends. If you want to have your code rated and show that as a Red criss then don’t add the exit code piping since you will loose that information

tirthbha commented 11 months ago

@laserlab You mean pylint rating will not be shown if we use exit code?

laserlab commented 11 months ago

it is shown inside the action but not necessarily inside the PR