DEMO: SF Ruby CFP configuration #24
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, master ] | |
| jobs: | |
| 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: .ruby-version | |
| bundler-cache: true | |
| - name: Lint code for consistent style | |
| run: bin/rubocop -f github | |
| lint_js: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Check prettier formatting | |
| run: bun run format | |
| - name: Check for linting errors | |
| run: bun run lint | |
| - name: Check type errors | |
| run: bun run check | |
| test: | |
| runs-on: ubuntu-latest | |
| env: | |
| RAILS_ENV: test | |
| # Increase Ferrum timeout to avoid occasional Ferrum::ProcessTimeoutError Browser did not produce websocket url within 10 second | |
| FERRUM_PROCESS_TIMEOUT: 25 | |
| 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: Precompile assets | |
| run: bin/rails assets:precompile | |
| - name: Run RSpec | |
| run: bundle exec rspec | |
| - name: Run system specs | |
| run: bundle exec rspec spec/system |