DEV: Add annotate rake tasks, and enforce via GitHub actions

`bin/rake annotate` is an alias of `bin/annotate --models`
`bin/rake annotate:clean` generates annotations by using a temporary, freshly migrated database. This should help us to produce more consistent annotations, even if development databases have been polluted by plugin migrations.

A GitHub actions task is also added which generates annotations on a clean database, and raises an error if they differ from the committed annotations.
This commit is contained in:
David Taylor
2021-07-06 09:47:16 +01:00
parent b3d3ad250b
commit 8c370c3fe3
4 changed files with 84 additions and 2 deletions

View File

@@ -165,6 +165,8 @@ group :test, :development do
gem 'parallel_tests'
gem 'rswag-specs'
gem 'annotate'
end
group :development do
@@ -173,7 +175,6 @@ group :development do
gem 'better_errors', platform: :mri, require: !!ENV['BETTER_ERRORS']
gem 'binding_of_caller'
gem 'yaml-lint'
gem 'annotate'
gem 'discourse_dev_assets'
gem 'faker', "~> 2.16"
end