Skip to content

Conversation

@aspino
Copy link
Collaborator

@aspino aspino commented Jan 29, 2025

This PR introduces a new GitHub CI action that takes care of running a linter process as well as the RSpec tests. It runs on every pull request change and when pushing to master.

Overcommit

Overcommit now runs as part of the CI action and will run the checks for which is configured. This includes Rubocop, so that's why it's not included in the action.

All of the offenses have been corrected.

Rubocop

First of all, config file for Rubocop has been adapted and plugins rubocop-factory_bot, rubocop-rake and rubocop-rspec have been added.

Most of the Rubocop offenses have been corrected. Those that have not have been annotated (using --disable-uncorrectable) so a #todo comment has been added right besides the offending code. As we keep adding changes to the code, if we happen to encounter one of these annotations, it would be convenient to address the Rubocop offense.

I think there's a relevant offense that is now annotated and has to do with the use of OpenStruct which is now not recommended due to security and performance issues. I'll try to raise a separate PR to address this.

Important: I added back the indexed_envelope_* tables to the schema dump, otherwise they were not created and tests failed. It doesn't seem to have any impact, but @excelsior please check that I've not introduced any weird behaviour because of this.

@aspino aspino self-assigned this Jan 29, 2025
@aspino aspino changed the title [WIP] Introduce action to run linter and tests Introduce action to run linter and tests Feb 5, 2025
@aspino aspino requested a review from excelsior February 5, 2025 16:18
@aspino aspino marked this pull request as ready for review February 5, 2025 16:18
@aspino aspino merged commit 583819b into master Feb 12, 2025
4 checks passed
@aspino aspino deleted the aspino/test-lint-action branch February 12, 2025 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants