Call-for-Code-for-Racial-Justice / FairChange

Mobile application to capture incidents / provide information to police officers aimed at avoiding escalation, central map view to enable search & visualization of incident clusters
34 stars 17 forks source link

Create GitHub actions to test any code before merging #48

Open upkarlidder opened 2 years ago

upkarlidder commented 2 years ago

Background on the problem the feature will solve/improved user experience

Add GitHub Actions to test and build new code pushed to a branch or committed to a pull request. Code that passes all the steps in the GitHub action can be merged in the repository.

Describe the solution you'd like

A GitHub action runs whenever code is committed to any branch or PR is made to the main branch for each of the following components:

Refer to a similar action that was implemented for the UI folder in Five Fifths Voter project.

Each action will

Tasks

Acceptance Criteria

GitHub action runs for every new code commit and PR.

FYI @demilolu

ghost commented 2 years ago

Hi, I would like to work on this issue

demilolu commented 2 years ago

@arianahl go for it!

ghost commented 2 years ago

@demilolu the pull request adds the git actions requested. A few things I would like to point out:

  1. backend and website don't have tests so I left that line commented out
  2. backend and mobile don't have lint configured so I left that line commented out
  3. website has lint but it is misconfigured and gives many errors when running

Are these known issues?

demilolu commented 2 years ago

@arianahl I think 1 and 2 are, but I'm not sure about 3.

@upkarlidder @Jamstew2 insight here?

upkarlidder commented 2 years ago

For 3, are you able to fix the errors @arianahl. That would be ideal.

ghost commented 2 years ago

@upkarlidder If no one is working on the website part of the code I can give it go. Otherwise they would get a horrible merge on their hands. Also a way to make it less intrusive is to change the current lint rule for parentheses: instead of having them on the next line leave them in the same line as most of the code already does. Actually this is only a problem in the index.js script. The rest of the files do follow allman style. I can also go ahead and turn it on for the other two folders (different PR?).

upkarlidder commented 2 years ago

@upkarlidder If no one is working on the website part of the code I can give it go. Otherwise they would get a horrible merge on their hands. ~Also a way to make it less intrusive is to change the current lint rule for parentheses: instead of having them on the next line leave them in the same line as most of the code already does.~ Actually this is only a problem in the index.js script. The rest of the files do follow allman style. I can also go ahead and turn it on for the other two folders (different PR?).

It sounds good to me. @Jamstew2 and team can you please provide some guidance as well?

ghost commented 2 years ago

@upkarlidder I fixed the linting issues as part of pull request #62 which adds to #61. I made sure the actions are still passing. Given the many changes I would recommend a thorough review from someone that knows the code just in case. I did test the website locally and I couldn't see any errors.

demilolu commented 2 years ago

@kyleni are you able to review the related PRs please?