|
1 | 1 | # Copyright 2024 Google LLC
|
2 |
| -# |
3 |
| -# Licensed under the Apache License, Version 2.0 (the "License"); |
4 |
| -# you may not use this file except in compliance with the License. |
5 |
| -# You may obtain a copy of the License at |
6 |
| -# |
7 |
| -# http://www.apache.org/licenses/LICENSE-2.0 |
8 |
| -# |
9 |
| -# Unless required by applicable law or agreed to in writing, software |
10 |
| -# distributed under the License is distributed on an "AS IS" BASIS, |
11 |
| -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12 |
| -# See the License for the specific language governing permissions and |
13 |
| -# limitations under the License. |
| 2 | +# SPDX-License-Identifier: Apache-2.0 |
14 | 3 |
|
15 | 4 | name: Build Check (Run npm run build everywhere locally if this fails)
|
16 | 5 |
|
|
22 | 11 |
|
23 | 12 | jobs:
|
24 | 13 | build:
|
25 |
| - name: Run build tasks |
| 14 | + name: Run build tasks (Node ${{ matrix.node-version }}) |
26 | 15 | runs-on: ubuntu-latest
|
| 16 | + strategy: |
| 17 | + matrix: |
| 18 | + node-version: ['20', '21', '22'] |
27 | 19 | steps:
|
28 |
| - - uses: actions/checkout@v3 |
29 |
| - - uses: pnpm/action-setup@v3 |
30 |
| - - name: Set up node v20 |
31 |
| - uses: actions/setup-node@v4 |
32 |
| - with: |
33 |
| - node-version: 20.x |
34 |
| - cache: pnpm |
35 |
| - - name: Install dependencies |
36 |
| - run: pnpm install |
37 |
| - - name: Run build script |
38 |
| - run: pnpm build |
39 |
| - - name: Run js tests |
40 |
| - run: pnpm test:js |
41 |
| - - name: Validate working directory is clean |
42 |
| - run: .github/workflows/scripts/ensure-clean-working-tree.sh |
| 20 | + - uses: actions/checkout@v3 |
| 21 | + - uses: pnpm/action-setup@v3 |
| 22 | + - name: Set up node v${{ matrix.node-version }} |
| 23 | + uses: actions/setup-node@v4 |
| 24 | + with: |
| 25 | + node-version: ${{ matrix.node-version }} |
| 26 | + cache: pnpm |
| 27 | + - name: Install dependencies |
| 28 | + run: pnpm install |
| 29 | + - name: Run build script |
| 30 | + run: pnpm build |
| 31 | + - name: Run js tests |
| 32 | + run: pnpm test:js |
| 33 | + - name: Validate working directory is clean |
| 34 | + run: .github/workflows/scripts/ensure-clean-working-tree.sh |
0 commit comments