clean rubocop offenses #597
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: activescaffold/active_scaffold | |
| on: | |
| push: | |
| pull_request: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: "${{ github.ref }}" | |
| cancel-in-progress: true | |
| jobs: | |
| lint-brakeman: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| env: | |
| BUNDLE_CLEAN: true | |
| BUNDLE_DEPLOYMENT: true | |
| BUNDLE_WITHOUT: 'default deployment development production test performance' | |
| steps: | |
| - uses: actions/checkout@v4.1.0 | |
| with: | |
| lfs: true | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '3.3' | |
| bundler-cache: true | |
| - run: bundle exec brakeman --exit-on-warn --output brakeman/index.html | |
| - uses: actions/upload-artifact@v4.1.0 | |
| if: always() | |
| with: | |
| name: "${{ github.job }}" | |
| retention-days: 1 | |
| path: brakeman | |
| lint-bundler-audit: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| env: | |
| BUNDLE_CLEAN: true | |
| BUNDLE_DEPLOYMENT: true | |
| BUNDLE_WITHOUT: 'default deployment development production test performance' | |
| steps: | |
| - uses: actions/checkout@v4.1.0 | |
| with: | |
| lfs: true | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '3.3' | |
| bundler-cache: true | |
| - run: bundle exec bundle-audit check --update --verbose | |
| lint-i18n: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| continue-on-error: true | |
| env: | |
| BUNDLE_CLEAN: true | |
| BUNDLE_DEPLOYMENT: true | |
| BUNDLE_WITHOUT: 'default deployment development production test performance' | |
| steps: | |
| - uses: actions/checkout@v4.1.0 | |
| with: | |
| lfs: true | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '3.3' | |
| bundler-cache: true | |
| - run: bundle exec i18n-tasks health | |
| lint-rubocop: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| env: | |
| BUNDLE_CLEAN: true | |
| BUNDLE_DEPLOYMENT: true | |
| BUNDLE_WITHOUT: 'default deployment development production test performance' | |
| steps: | |
| - uses: actions/checkout@v4.1.0 | |
| with: | |
| lfs: true | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '3.3' | |
| bundler-cache: true | |
| - run: bundle exec rubocop | |
| test: | |
| name: Ruby ${{ matrix.ruby }} / Rails ${{ matrix.rails }} | |
| needs: | |
| - lint-brakeman | |
| - lint-bundler-audit | |
| - lint-i18n | |
| - lint-rubocop | |
| runs-on: ubuntu-latest | |
| continue-on-error: ${{ matrix.allow_failure || false }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| #ruby: [ "4.0", "3.4", "3.3", "3.2", "jruby-10.0" ] | |
| ruby: [ "3.4", "3.3", "3.2", "jruby-10.0" ] | |
| rails: [ "8.1", "8.0", "7.2" ] | |
| exclude: | |
| - ruby: 'jruby-10.0' | |
| rails: '8.1' | |
| - ruby: '4.0' | |
| rails: '8.0' | |
| - ruby: '4.0' | |
| rails: '7.2' | |
| include: | |
| - ruby: '3.4' | |
| rails: '7.2' | |
| coverage: true | |
| - ruby: '4.0' | |
| allow_failure: true | |
| timeout-minutes: 60 | |
| env: | |
| JRUBY_OPTS: "--debug" | |
| LC_ALL: C.UTF-8 | |
| RAILS_ENV: test | |
| BUNDLE_GEMFILE: gemfiles/Gemfile.rails-${{ matrix.rails }}.x | |
| BUNDLE_CLEAN: true | |
| BUNDLE_DEPLOYMENT: true | |
| BUNDLE_WITHOUT: 'deployment development lint production performance' | |
| steps: | |
| - uses: actions/checkout@v4.1.0 | |
| with: | |
| lfs: true | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby }} | |
| bundler-cache: true | |
| - run: COVERAGE=${{ matrix.coverage}} bundle exec rake | |
| - uses: qltysh/qlty-action/coverage@v1 | |
| with: | |
| token: ${{ secrets.QLTY_COVERAGE_TOKEN }} | |
| files: coverage/coverage.json | |
| if: matrix.coverage | |
| - uses: actions/upload-artifact@v4.1.0 | |
| if: success() && matrix.coverage | |
| with: | |
| name: "${{ github.job }}-coverage" | |
| retention-days: 1 | |
| path: coverage |