Skip to content

Commit 26c4b78

Browse files
authored
Split workflows between 1st and 2nd gen Node (#1188)
1 parent 06f7b49 commit 26c4b78

File tree

8 files changed

+85
-11520
lines changed

8 files changed

+85
-11520
lines changed

.github/workflows/test_node.yml

+9-7
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,22 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
name: CI Tests
15+
name: 2nd Gen CI Tests
1616

1717
on:
1818
pull_request:
1919
paths:
2020
- 'Node/**'
21-
- 'Node-1st-gen/**'
2221
- 'package.json'
2322
- 'package-lock.json'
2423
- 'pnpm-workspace.yaml'
2524
- 'pnpm-lock.yaml'
2625
- 'tsconfig.template.json'
2726
push:
27+
branches:
28+
- main
2829
paths:
2930
- 'Node/**'
30-
- 'Node-1st-gen/**'
3131
- 'package.json'
3232
- 'package-lock.json'
3333
- 'pnpm-workspace.yaml'
@@ -43,6 +43,8 @@ jobs:
4343
strategy:
4444
matrix:
4545
node-version:
46+
# The latest Node version for 2nd gen
47+
# https://cloud.google.com/functions/docs/runtime-support#node.js
4648
- 22.x
4749
steps:
4850
- uses: actions/checkout@v4
@@ -57,7 +59,7 @@ jobs:
5759
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
5860

5961
- run: npm install
60-
- run: npm run bootstrap
61-
- run: npm run lint
62-
- run: npm run compile
63-
- run: npm run test
62+
- run: npm run bootstrap-2nd-gen
63+
- run: npm run lint-2nd-gen
64+
- run: npm run compile-2nd-gen
65+
- run: npm run test-2nd-gen
+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Copyright 2023 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.
14+
15+
name: 1st Gen CI Tests
16+
17+
on:
18+
pull_request:
19+
paths:
20+
- 'Node-1st-gen/**'
21+
- 'package.json'
22+
- 'package-lock.json'
23+
- 'pnpm-workspace.yaml'
24+
- 'pnpm-lock.yaml'
25+
- 'tsconfig.template.json'
26+
push:
27+
branches:
28+
- main
29+
paths:
30+
- 'Node-1st-gen/**'
31+
- 'package.json'
32+
- 'package-lock.json'
33+
- 'pnpm-workspace.yaml'
34+
- 'pnpm-lock.yaml'
35+
- 'tsconfig.template.json'
36+
37+
env:
38+
CI: true
39+
40+
jobs:
41+
unit:
42+
runs-on: ubuntu-latest
43+
strategy:
44+
matrix:
45+
node-version:
46+
# The latest Node version for 1st gen
47+
# https://cloud.google.com/functions/docs/runtime-support#node.js
48+
- 20.x
49+
steps:
50+
- uses: actions/checkout@v4
51+
- uses: actions/setup-node@v4
52+
with:
53+
node-version: ${{ matrix.node-version }}
54+
55+
- name: Cache npm
56+
uses: actions/cache@v4
57+
with:
58+
path: ~/.npm
59+
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
60+
61+
- run: npm install
62+
- run: npm run bootstrap-1st-gen
63+
- run: npm run lint-1st-gen
64+
- run: npm run compile-1st-gen
65+
- run: npm run test-1st-gen

.github/workflows/test_python.yml

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ on:
2020
- 'Python/**'
2121

2222
push:
23+
branches:
24+
- main
2325
paths:
2426
- 'Python/**'
2527

Node-1st-gen/.npmrc

-5
This file was deleted.

0 commit comments

Comments
 (0)