pnpm upgrade #1820
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
| # This workflow uses actions that are not certified by GitHub. They are | |
| # provided by a third-party and are governed by separate terms of service, | |
| # privacy policy, and support documentation. | |
| # | |
| # This workflow will install a prebuilt Ruby version, install dependencies, and | |
| # run tests and linters. | |
| --- | |
| name: "Ruby on Rails CI" | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| env: | |
| RAILS_ENV: test | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up pnpm | |
| uses: pnpm/action-setup@v6 | |
| with: | |
| run_install: false | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "24" | |
| cache: pnpm | |
| cache-dependency-path: pnpm-lock.yaml | |
| - name: Install Ruby and gems | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '3.3' # Not needed with a .ruby-version file | |
| bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
| - name: Check pnpm | |
| run: pnpm --version | |
| - name: Set up database schema | |
| run: bin/rails db:schema:load | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Assets Precompile | |
| run: bundle exec rails assets:precompile RAILS_PRECOMPILE=1 RAILS_ENV=production SECRET_KEY_BASE=fake_secure_for_compile | |
| - name: Run tests | |
| run: bin/rake | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Install Ruby and gems | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '3.3' # Not needed with a .ruby-version file | |
| bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
| - name: Lint Ruby files | |
| run: bundle exec standardrb |