nus-cs2103-AY2425S1 / forum

12 stars 0 forks source link

Github Actions build and check with gradle failing #353

Closed Raghava-Chittidi closed 1 month ago

Raghava-Chittidi commented 1 month ago

Helloo, all the tests are passing when I run them on Intellij IDE. However, when I push to github, the github actions step build and check with gradle is failing for some reason due to failed tests. The expected and actual output it is displaying also looks the same to me so I am not very sure what could be a possible issue.

Screenshot 2024-09-19 at 7 45 20 PM
damithc commented 1 month ago

@Raghava-Chittidi Which OS are you using locally? Certain behaviors can vary based on the OS e.g., the line endings differ between Windows and Mac/Linux.

suhayl13 commented 1 month ago

It seems like there is a mismatch in the case sensitivity. It was expecting a lowercase “pm” but received an uppercase “PM”.

Raghava-Chittidi commented 1 month ago

I am using macOS Sonoma 14.2. Ohh I am not too sure why the uppercase is there because when I run the tests locally they were all lowercase and they passed all the tests

suhayl13 commented 1 month ago

I think the date and time is being formatted differently on GitHub actions. I searched this up so maybe can try adding the following code into the yaml file:

- name: Set locale
  run: sudo update-locale LANG=en_US.UTF-8
emmannyyy commented 1 month ago

I think this is similar to the issues I faced in #277 and #307.

You can probably set the time locality for the whole run of the application in your Main() method, as #307 suggests

Raghava-Chittidi commented 1 month ago

Thank you everyone!