moving method to public #239
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@v4 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: .ruby-version | |
| bundler-cache: true | |
| - name: Update RubyGems | |
| run: gem update --system 3.4.22 | |
| - name: Cache Ruby gems | |
| uses: actions/cache@v3 | |
| with: | |
| path: vendor/bundle | |
| key: setup-ruby-bundler-cache-v7-${{ runner.os }}-ruby-3.1.2-${{ hashFiles('**/Gemfile.lock') }} | |
| restore-keys: | | |
| setup-ruby-bundler-cache-v7-${{ runner.os }}-ruby-3.1.2- | |
| setup-ruby-bundler-cache-v7-${{ runner.os }}- | |
| - name: Install dependencies | |
| run: bundle install --jobs 4 --retry 3 | |
| - name: Install error_highlight 0.7.0 | |
| run: gem install error_highlight -v 0.7.0 | |
| - name: Scan for common Rails security vulnerabilities using static analysis | |
| run: bundle exec brakeman --no-pager | |
| scan_js: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: .ruby-version | |
| bundler-cache: true | |
| - name: Install dependencies | |
| run: bundle install --jobs 4 --retry 3 | |
| - name: Scan for security vulnerabilities in JavaScript dependencies | |
| run: bundle exec importmap audit | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: 3.3 | |
| bundler-cache: true | |
| - name: Install dependencies | |
| run: bundle install --jobs 4 --retry 3 | |
| - name: Lint code for consistent style | |
| run: bundle exec rubocop -f github | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install packages | |
| run: sudo apt-get update && sudo apt-get install --no-install-recommends -y google-chrome-stable curl libjemalloc2 libvips sqlite3 | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: 3.3 | |
| bundler-cache: true | |
| - name: Cache Ruby gems | |
| uses: actions/cache@v3 | |
| with: | |
| path: vendor/bundle | |
| key: setup-ruby-bundler-cache-v7-${{ runner.os }}-ruby-${{ steps.setup-ruby.outputs.ruby-version }}-${{ hashFiles('**/Gemfile.lock') }} | |
| restore-keys: | | |
| setup-ruby-bundler-cache-v7-${{ runner.os }}-ruby-${{ steps.setup-ruby.outputs.ruby-version }}- | |
| setup-ruby-bundler-cache-v7-${{ runner.os }}- | |
| - name: Install dependencies | |
| run: bundle install --jobs 4 --retry 3 | |
| - name: Run tests | |
| env: | |
| RAILS_ENV: test | |
| run: bundle exec rails db:test:prepare && bundle exec rails test test:system | |
| - name: Keep screenshots from failed system tests | |
| uses: actions/upload-artifact@v4 | |
| if: failure() | |
| with: | |
| name: screenshots | |
| path: ${{ github.workspace }}/tmp/screenshots | |
| if-no-files-found: ignore | |
| - name: Debug Bundler Environment | |
| run: bundle env |