Bump view_component from 4.12.0 to 4.15.0 #1220
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: | |
| scan_ruby: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7.0.1 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1.321.0 | |
| with: | |
| ruby-version: .ruby-version | |
| bundler-cache: true | |
| - name: Scan for common Rails security vulnerabilities using static analysis | |
| run: bin/brakeman --no-pager | |
| verify_gem_package: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7.0.1 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1.321.0 | |
| with: | |
| ruby-version: .ruby-version | |
| bundler-cache: true | |
| - name: Verify built gem contains all expected files | |
| run: ruby script/verify_gem_package.rb | |
| detect_changes: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| packaging: ${{ steps.filter.outputs.packaging }} | |
| steps: | |
| - uses: actions/checkout@v7.0.1 | |
| - uses: dorny/paths-filter@v4.0.3 | |
| id: filter | |
| with: | |
| filters: | | |
| packaging: | |
| - 'cfa_ui_components.gemspec' | |
| - 'app/assets/**' | |
| - 'lib/**' | |
| - 'package.json' | |
| - 'script/smoke_test_gem_install.sh' | |
| - 'script/verify_gem_package.rb' | |
| - '.github/workflows/ci.yml' | |
| smoke_test_gem_install: | |
| runs-on: ubuntu-latest | |
| needs: detect_changes | |
| # Always run on push to main; on PRs, only run if packaging-relevant files changed. | |
| if: github.event_name == 'push' || needs.detect_changes.outputs.packaging == 'true' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7.0.1 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1.321.0 | |
| with: | |
| ruby-version: .ruby-version | |
| bundler-cache: true | |
| - name: Set up Node | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version-file: .node-version | |
| cache: yarn | |
| - name: Cache Rails gem for dummy app | |
| uses: actions/cache@v6 | |
| with: | |
| path: ~/.smoke-test-gems | |
| key: smoke-test-gems-${{ runner.os }}-ruby-${{ hashFiles('.ruby-version') }}-rails8 | |
| - name: Run end-to-end smoke test | |
| env: | |
| SMOKE_TEST_GEM_HOME: /home/runner/.smoke-test-gems | |
| run: script/smoke_test_gem_install.sh | |
| test: | |
| runs-on: ubuntu-latest | |
| # services: | |
| # redis: | |
| # image: redis | |
| # ports: | |
| # - 6379:6379 | |
| # options: --health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5 | |
| steps: | |
| - name: Install packages | |
| run: sudo apt-get update && sudo apt-get install --no-install-recommends -y build-essential git libyaml-dev pkg-config google-chrome-stable | |
| - name: Checkout code | |
| uses: actions/checkout@v7.0.1 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1.321.0 | |
| with: | |
| ruby-version: .ruby-version | |
| bundler-cache: true | |
| - name: Set up Node | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version-file: .node-version | |
| cache: yarn | |
| - name: Run tests | |
| env: | |
| RAILS_ENV: test | |
| # REDIS_URL: redis://localhost:6379/0 | |
| run: bin/rails test:all | |
| - name: Keep screenshots from failed system tests | |
| uses: actions/upload-artifact@v7 | |
| if: failure() | |
| with: | |
| name: screenshots | |
| path: ${{ github.workspace }}/tmp/screenshots | |
| if-no-files-found: ignore |