[openstreetmap/openstreetmap-website] .github/workflows/lint.yml: Check if annotate_models is up to date (PR #4286)

Andy Allan notifications at github.com
Fri Oct 13 13:47:41 UTC 2023


@gravitystorm requested changes on this pull request.

Looks good, just one inline question and two other requests:

* From CONTRIBUTING.md - "Avoid including "fixup" commits. If you have added a fixup commit (for example to fix a rubocop warning, or because you changed your own new code) please combine the fixup commit into the commit that introduced the problem. git rebase -i is very useful for this."
* Could you please have the changes to the docs as the first commit, and then the addition of the linting as a second commit, that way the CI would pass for either of them.

> +    - name: Setup ruby
+      uses: ruby/setup-ruby at v1
+      with:
+        ruby-version: ${{ env.ruby }}
+        bundler-cache: true
+    - name: Setup database
+      run: |
+        sudo systemctl start postgresql
+        sudo -u postgres createuser -s $(id -un)
+        createdb openstreetmap
+        cp config/github.database.yml config/database.yml
+        bundle exec rails db:test:load
+    - name: Run Annotate Models
+      run: bundle exec rails annotate_models
+    - name: Fail if model annotations are out of date
+      run: git diff --exit-code app/models/

Is this restriction necessary? It means we need to change this in future if we annotate factories or routes etc.

If we can relax the restriction that's less work for the future.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4286#pullrequestreview-1676540278
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/4286/review/1676540278 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20231013/da4cdc4c/attachment.htm>


More information about the rails-dev mailing list