add a tag diff to the /history endpoint #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Lint | |
| on: | |
| push: | |
| branches-ignore: | |
| - "dependabot/**" | |
| - translatewiki | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| ruby: '3.2' | |
| jobs: | |
| rubocop: | |
| name: RuboCop | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Setup ruby | |
| uses: ruby/setup-ruby@e65c17d16e57e481586a6a5a0282698790062f92 # v1.300.0 | |
| with: | |
| ruby-version: ${{ env.ruby }} | |
| rubygems: 3.4.10 | |
| bundler-cache: true | |
| - name: Run rubocop | |
| run: bundle exec rubocop --format fuubar | |
| erblint: | |
| name: ERB Lint | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Setup ruby | |
| uses: ruby/setup-ruby@e65c17d16e57e481586a6a5a0282698790062f92 # v1.300.0 | |
| with: | |
| ruby-version: ${{ env.ruby }} | |
| rubygems: 3.4.10 | |
| bundler-cache: true | |
| - name: Run erblint | |
| run: bundle exec erb_lint . | |
| herb: | |
| name: Herb | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Setup ruby | |
| uses: ruby/setup-ruby@e65c17d16e57e481586a6a5a0282698790062f92 # v1.300.0 | |
| with: | |
| ruby-version: ${{ env.ruby }} | |
| rubygems: 3.4.10 | |
| bundler-cache: true | |
| - name: Run herb parser | |
| run: bundle exec herb analyze app/ | |
| - name: Cache node modules | |
| uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 | |
| with: | |
| cache: yarn | |
| - name: Install node modules | |
| run: bundle exec bin/yarn install | |
| - name: Create dummy database configuration | |
| run: cp config/example.database.yml config/database.yml | |
| - name: Run herb linter | |
| run: bundle exec bin/yarn run herb-lint | |
| eslint: | |
| name: ESLint | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Setup ruby | |
| uses: ruby/setup-ruby@e65c17d16e57e481586a6a5a0282698790062f92 # v1.300.0 | |
| with: | |
| ruby-version: ${{ env.ruby }} | |
| rubygems: 3.4.10 | |
| bundler-cache: true | |
| - name: Cache node modules | |
| uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 | |
| with: | |
| cache: yarn | |
| - name: Install node modules | |
| run: bundle exec bin/yarn install | |
| - name: Create dummy database configuration | |
| run: cp config/example.database.yml config/database.yml | |
| - name: Run eslint | |
| run: bundle exec rails eslint | |
| brakeman: | |
| name: Brakeman | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Setup ruby | |
| uses: ruby/setup-ruby@e65c17d16e57e481586a6a5a0282698790062f92 # v1.300.0 | |
| with: | |
| ruby-version: ${{ env.ruby }} | |
| rubygems: 3.4.10 | |
| bundler-cache: true | |
| - name: Run brakeman | |
| run: bundle exec brakeman -q | |
| annotate_models: | |
| env: | |
| RAILS_ENV: test | |
| name: Rails Annotate Models | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Setup ruby | |
| uses: ruby/setup-ruby@e65c17d16e57e481586a6a5a0282698790062f92 # v1.300.0 | |
| with: | |
| ruby-version: ${{ env.ruby }} | |
| rubygems: 3.4.10 | |
| bundler-cache: true | |
| - name: Configure rails | |
| run: | | |
| cp config/github.database.yml config/database.yml | |
| cp config/example.storage.yml config/storage.yml | |
| - name: Cache node modules | |
| uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 | |
| with: | |
| cache: yarn | |
| - name: Install node modules | |
| run: bundle exec bin/yarn install | |
| - name: Setup database | |
| run: | | |
| sudo systemctl start postgresql | |
| sudo -u postgres createuser -s $(id -un) | |
| createdb openstreetmap | |
| bundle exec rails db:schema:load | |
| - name: Run Annotate Models | |
| run: bundle exec annotaterb models | |
| - name: Fail if model annotations are out of date | |
| run: git diff --exit-code | |
| database_consistency: | |
| env: | |
| RAILS_ENV: test | |
| name: Database Consistency | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Setup ruby | |
| uses: ruby/setup-ruby@e65c17d16e57e481586a6a5a0282698790062f92 # v1.300.0 | |
| with: | |
| ruby-version: ${{ env.ruby }} | |
| rubygems: 3.4.10 | |
| bundler-cache: true | |
| - name: Configure rails | |
| run: | | |
| cp config/github.database.yml config/database.yml | |
| cp config/example.storage.yml config/storage.yml | |
| - name: Cache node modules | |
| uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 | |
| with: | |
| cache: yarn | |
| - name: Install node modules | |
| run: bundle exec bin/yarn install | |
| - name: Setup database | |
| run: | | |
| sudo systemctl start postgresql | |
| sudo -u postgres createuser -s $(id -un) | |
| createdb openstreetmap | |
| bundle exec rails db:schema:load | |
| - name: Run Database Consistency | |
| run: bundle exec database_consistency |