fix(js): test on node versions 20 through 22; 23 is currently broken #1995 #3668
This file contains 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
# Copyright 2024 Google LLC | |
# SPDX-License-Identifier: Apache-2.0 | |
name: Formatting Check (Run npm run format locally if this fails) | |
on: pull_request | |
env: | |
GITHUB_PULL_REQUEST_HEAD_SHA: ${{ github.event.pull_request.head.sha }} | |
GITHUB_PULL_REQUEST_BASE_SHA: ${{ github.event.pull_request.base.sha }} | |
jobs: | |
format: | |
name: Run formatting/linting tasks | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: pnpm/action-setup@v3 | |
- name: Set up node v20 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
cache: pnpm | |
- name: Install dependencies | |
run: pnpm install | |
- name: Check formatting | |
run: pnpm format:check |