6 group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
7 cancel-in-progress: true
13 runs-on: ubuntu-latest
16 - name: Check out code
17 uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
19 uses: ruby/setup-ruby@efbf473cab83af4468e8606cc33eca9281bb213f # v1.256.0
21 ruby-version: ${{ env.ruby }}
25 run: bundle exec rubocop --format fuubar
31 - name: Check out code
32 uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
34 uses: ruby/setup-ruby@efbf473cab83af4468e8606cc33eca9281bb213f # v1.256.0
36 ruby-version: ${{ env.ruby }}
40 run: bundle exec erb_lint .
46 - name: Check out code
47 uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
49 uses: ruby/setup-ruby@efbf473cab83af4468e8606cc33eca9281bb213f # v1.256.0
51 ruby-version: ${{ env.ruby }}
54 - name: Cache node modules
55 uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
58 - name: Install node modules
59 run: bundle exec bin/yarn install
60 - name: Create dummy database configuration
61 run: cp config/example.database.yml config/database.yml
63 run: bundle exec rails eslint
69 - name: Check out code
70 uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
72 uses: ruby/setup-ruby@efbf473cab83af4468e8606cc33eca9281bb213f # v1.256.0
74 ruby-version: ${{ env.ruby }}
78 run: bundle exec brakeman -q
82 name: Rails Annotate Models
86 - name: Check out code
87 uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
89 uses: ruby/setup-ruby@efbf473cab83af4468e8606cc33eca9281bb213f # v1.256.0
91 ruby-version: ${{ env.ruby }}
94 - name: Configure rails
96 cp config/github.database.yml config/database.yml
97 cp config/example.storage.yml config/storage.yml
98 - name: Cache node modules
99 uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
102 - name: Install node modules
103 run: bundle exec bin/yarn install
104 - name: Setup database
106 sudo systemctl start postgresql
107 sudo -u postgres createuser -s $(id -un)
108 createdb openstreetmap
109 bundle exec rails db:schema:load
110 - name: Run Annotate Models
111 run: bundle exec annotaterb models
112 - name: Fail if model annotations are out of date
113 run: git diff --exit-code