Containerize app, upgrade Rails to 8.1.3, and overhaul CI #107
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: | |
| branches: [main] | |
| push: | |
| branches: [main] | |
| jobs: | |
| # --------------------------------------------------------------------------- | |
| # Lint – RuboCop static analysis | |
| # --------------------------------------------------------------------------- | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: 3.4.5 | |
| bundler-cache: true | |
| - name: RuboCop | |
| run: bundle exec rubocop --parallel | |
| # --------------------------------------------------------------------------- | |
| # Test – RSpec suite | |
| # --------------------------------------------------------------------------- | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| env: | |
| RAILS_ENV: test | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: 3.4.5 | |
| bundler-cache: true | |
| - name: Prepare test database | |
| run: bundle exec rails db:prepare | |
| - name: Run RSpec | |
| run: bundle exec rspec |