Merge pull request #8 from basecamp/dependabot/bundler/puma-7.2.0 #62
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: CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: [ main ] | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| env: | |
| RUBY_VERSION: ruby-4.0.0 | |
| RUBOCOP_CACHE_ROOT: tmp/rubocop | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ env.RUBY_VERSION }} | |
| bundler-cache: true | |
| - name: Prepare RuboCop cache | |
| uses: actions/cache@v5 | |
| env: | |
| DEPENDENCIES_HASH: ${{ hashFiles('**/.rubocop.yml', '**/.rubocop_todo.yml', 'Gemfile.lock') }} | |
| with: | |
| path: ${{ env.RUBOCOP_CACHE_ROOT }} | |
| key: rubocop-${{ runner.os }}-${{ env.RUBY_VERSION }}-${{ env.DEPENDENCIES_HASH }}-${{ github.ref_name == github.event.repository.default_branch && github.run_id || 'default' }} | |
| restore-keys: | | |
| rubocop-${{ runner.os }}-${{ env.RUBY_VERSION }}-${{ env.DEPENDENCIES_HASH }}- | |
| - name: Lint code for consistent style | |
| run: bin/rubocop -f github | |
| security: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ruby-4.0.0 | |
| bundler-cache: true | |
| - name: Run Brakeman security scan | |
| run: bin/brakeman --quiet --no-pager --exit-on-warn --exit-on-error | |
| test: | |
| runs-on: ubuntu-latest | |
| services: | |
| upright-playwright: | |
| image: jacoblincool/playwright:chromium-server-1.55.0 | |
| ports: | |
| - 53333:53333 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ruby-4.0.0 | |
| bundler-cache: true | |
| - name: Run tests | |
| env: | |
| RAILS_ENV: test | |
| # RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }} | |
| # REDIS_URL: redis://localhost:6379/0 | |
| run: bin/rails test | |
| - name: Keep screenshots from failed system tests | |
| uses: actions/upload-artifact@v6 | |
| if: failure() | |
| with: | |
| name: screenshots | |
| path: ${{ github.workspace }}/tmp/screenshots | |
| if-no-files-found: ignore |