chore: Trigger rebuild for pending migration #79
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: Main | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| env: | |
| RUBY_VERSION: "3.4.9" | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ env.RUBY_VERSION }} | |
| bundler-cache: true | |
| - name: Run RuboCop | |
| run: | | |
| bundle exec rubocop | |
| test: | |
| runs-on: ubuntu-latest | |
| env: | |
| RAILS_ENV: test | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| REDIS_URL: redis://localhost:6379 | |
| services: | |
| postgres: | |
| image: postgres:15 | |
| env: | |
| POSTGRES_PASSWORD: postgres | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| redis: | |
| image: redis | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ env.RUBY_VERSION }} | |
| bundler-cache: true # This will cache dependencies | |
| - name: Setup database | |
| run: | | |
| bundle exec rails db:create db:migrate | |
| - name: Setup Chrome | |
| uses: browser-actions/setup-chrome@latest | |
| with: | |
| chrome-version: stable | |
| - name: Run tests | |
| run: | | |
| bundle exec rspec | |
| shakapacker: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ env.RUBY_VERSION }} | |
| bundler-cache: true | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: yarn | |
| - name: Install dependencies | |
| run: | | |
| yarn install --frozen-lockfile | |
| - name: Run shakapacker | |
| run: | | |
| bin/shakapacker |