Skip to content

Commit

Permalink
Split workflows between 1st and 2nd gen Node (#1188)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhuleatt authored Jan 31, 2025
1 parent 06f7b49 commit 26c4b78
Show file tree
Hide file tree
Showing 8 changed files with 85 additions and 11,520 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/test_node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@
# See the License for the specific language governing permissions and
# limitations under the License.

name: CI Tests
name: 2nd Gen CI Tests

on:
pull_request:
paths:
- 'Node/**'
- 'Node-1st-gen/**'
- 'package.json'
- 'package-lock.json'
- 'pnpm-workspace.yaml'
- 'pnpm-lock.yaml'
- 'tsconfig.template.json'
push:
branches:
- main
paths:
- 'Node/**'
- 'Node-1st-gen/**'
- 'package.json'
- 'package-lock.json'
- 'pnpm-workspace.yaml'
Expand All @@ -43,6 +43,8 @@ jobs:
strategy:
matrix:
node-version:
# The latest Node version for 2nd gen
# https://cloud.google.com/functions/docs/runtime-support#node.js
- 22.x
steps:
- uses: actions/checkout@v4
Expand All @@ -57,7 +59,7 @@ jobs:
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}

- run: npm install
- run: npm run bootstrap
- run: npm run lint
- run: npm run compile
- run: npm run test
- run: npm run bootstrap-2nd-gen
- run: npm run lint-2nd-gen
- run: npm run compile-2nd-gen
- run: npm run test-2nd-gen
65 changes: 65 additions & 0 deletions .github/workflows/test_node_1st_gen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: 1st Gen CI Tests

on:
pull_request:
paths:
- 'Node-1st-gen/**'
- 'package.json'
- 'package-lock.json'
- 'pnpm-workspace.yaml'
- 'pnpm-lock.yaml'
- 'tsconfig.template.json'
push:
branches:
- main
paths:
- 'Node-1st-gen/**'
- 'package.json'
- 'package-lock.json'
- 'pnpm-workspace.yaml'
- 'pnpm-lock.yaml'
- 'tsconfig.template.json'

env:
CI: true

jobs:
unit:
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
# The latest Node version for 1st gen
# https://cloud.google.com/functions/docs/runtime-support#node.js
- 20.x
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Cache npm
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}

- run: npm install
- run: npm run bootstrap-1st-gen
- run: npm run lint-1st-gen
- run: npm run compile-1st-gen
- run: npm run test-1st-gen
2 changes: 2 additions & 0 deletions .github/workflows/test_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ on:
- 'Python/**'

push:
branches:
- main
paths:
- 'Python/**'

Expand Down
5 changes: 0 additions & 5 deletions Node-1st-gen/.npmrc

This file was deleted.

Loading

0 comments on commit 26c4b78

Please sign in to comment.