Use Ruby 3.4 and Node 22 in GitHub actions #103
Workflow file for this run
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: lint | |
| on: | |
| pull_request: | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| # Caching | |
| - name: Set up cache for Bundler | |
| uses: actions/cache@v4 | |
| with: | |
| path: vendor/bundle | |
| key: ${{ runner.os }}-gems-${{ hashFiles('**/*.gemspec') }}-${{ hashFiles('**/Gemfile') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gems- | |
| - name: Get yarn cache directory path | |
| id: yarn-cache-dir-path | |
| run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | |
| - name: Set up cache for Yarn | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
| key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-yarn- | |
| # Ruby/Node | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: 3.4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v1 | |
| with: | |
| node-version: 22 | |
| # Dependencies | |
| - name: Install Ruby dependencies | |
| run: | | |
| bundle config path vendor/bundle | |
| bundle install --jobs 4 --retry 3 | |
| - name: Install JavaScript dependencies | |
| run: yarn install | |
| # Build | |
| - name: Build packages | |
| run: | | |
| bin/build-packages | |
| # Lint | |
| - name: Run RuboCop | |
| shell: bash | |
| continue-on-error: true | |
| run: | | |
| bundle exec rubocop --format github | sed 's/::error/::warning/g' | |
| - name: Run ESLint in pageflow package | |
| shell: bash | |
| continue-on-error: true | |
| run: | | |
| yarn --cwd package lint . --format @jamesacarr/github-actions | |
| - name: Run ESLint in pageflow-scrolled | |
| shell: bash | |
| continue-on-error: true | |
| run: | | |
| yarn --cwd entry_types/scrolled/package lint . --format @jamesacarr/github-actions |