Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 20 additions & 28 deletions .github/workflows/builder.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
# Copyright 2024 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.
# SPDX-License-Identifier: Apache-2.0

name: Build Check (Run npm run build everywhere locally if this fails)

Expand All @@ -22,21 +11,24 @@ env:

jobs:
build:
name: Run build tasks
name: Run build tasks (Node ${{ matrix.node-version }})
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['20', '21', '22']
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: Run build script
run: pnpm build
- name: Run js tests
run: pnpm test:js
- name: Validate working directory is clean
run: .github/workflows/scripts/ensure-clean-working-tree.sh
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v3
- name: Set up node v${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Run build script
run: pnpm build
- name: Run js tests
run: pnpm test:js
- name: Validate working directory is clean
run: .github/workflows/scripts/ensure-clean-working-tree.sh
13 changes: 1 addition & 12 deletions .github/workflows/bump-cli-version.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
# Copyright 2024 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.
# SPDX-License-Identifier: Apache-2.0

name: Bump and Tag CLI Version

Expand Down
13 changes: 1 addition & 12 deletions .github/workflows/bump-js-version.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
# Copyright 2024 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.
# SPDX-License-Identifier: Apache-2.0

name: Bump and Tag JS Version

Expand Down
13 changes: 1 addition & 12 deletions .github/workflows/bump-package-version.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
# Copyright 2024 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.
# SPDX-License-Identifier: Apache-2.0

name: Bump Version for a package

Expand Down
22 changes: 7 additions & 15 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
# Copyright 2024 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.
# SPDX-License-Identifier: Apache-2.0

name: Run e2e tests

Expand All @@ -21,15 +10,18 @@ on:

jobs:
build:
name: Run e2e tests
name: Run e2e tests (Node ${{ matrix.node-version }})
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['20', '21', '22']
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v3
- name: Set up node v20
- name: Set up node v${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: ${{ matrix.node-version }}
cache: pnpm
- name: Install dependencies
run: pnpm install
Expand Down
13 changes: 1 addition & 12 deletions .github/workflows/formatter.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
# Copyright 2024 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.
# SPDX-License-Identifier: Apache-2.0

name: Formatting Check (Run npm run format locally if this fails)

Expand Down
13 changes: 1 addition & 12 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
# Copyright 2024 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.
# SPDX-License-Identifier: Apache-2.0

name: Go tests and checks

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
python-version:
- "3.12"
- "3.12" # uv manages versions; this is base.

steps:
- uses: actions/checkout@v4
Expand Down
13 changes: 1 addition & 12 deletions .github/workflows/release_js_main.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
# Copyright 2024 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.
# SPDX-License-Identifier: Apache-2.0

name: Release Genkit JS

Expand Down
46 changes: 19 additions & 27 deletions .github/workflows/samples.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
# Copyright 2024 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.
# SPDX-License-Identifier: Apache-2.0

name: Build Samples (only runs if /samples/** is changed)

on:
on:
pull_request:
paths: samples/**

Expand All @@ -24,19 +13,22 @@ env:

jobs:
build:
name: Build Samples
name: Build Samples (Node ${{ matrix.node-version }})
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['20', '21', '22']
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: Build Samples
run: pnpm build:js-samples
- name: Validate working directory is clean
run: .github/workflows/scripts/ensure-clean-working-tree.sh
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v3
- name: Set up node v${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Build Samples
run: pnpm build:js-samples
- name: Validate working directory is clean
run: .github/workflows/scripts/ensure-clean-working-tree.sh
38 changes: 15 additions & 23 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
# Copyright 2024 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.
# SPDX-License-Identifier: Apache-2.0

name: Run Tests

Expand All @@ -24,15 +13,18 @@ jobs:
build:
name: Run Tests (just DevUI tests for now)
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['20', '21', '22']
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 and build
run: pnpm build:genkit-tools
- name: Run tests
run: pnpm test:genkit-tools
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v3
- name: Set up node v${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- name: Install dependencies and build
run: pnpm build:genkit-tools
- name: Run tests
run: pnpm test:genkit-tools
1 change: 1 addition & 0 deletions bin/add_license
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ $HOME/go/bin/addlicense \
-ignore '**/dist/**/*' \
-ignore '**/node_modules/**/*' \
-ignore '**/pnpm-lock.yaml' \
-ignore '**/py/site/**/*.html' \
-ignore '.nx/**/*' \
-ignore '.trunk/**/*' \
"$TOP_DIR"
1 change: 1 addition & 0 deletions bin/check_license
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ $HOME/go/bin/addlicense \
-ignore '**/dist/**/*' \
-ignore '**/node_modules/**/*' \
-ignore '**/pnpm-lock.yaml' \
-ignore '**/py/site/**/*.html' \
-ignore '.nx/**/*' \
-ignore '.trunk/**/*' \
"$TOP_DIR"
16 changes: 6 additions & 10 deletions bin/fmt
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,9 @@ fi
popd

# Format all TypeScript code.
#
# TODO: Re-enable once we have biome configured and enabled because that is
# several times faster and compatible.
#
#pushd ${TOP_DIR}
#pnpm run format
#if [[ $? -ne 0 ]]; then
# exit 1
#fi
#popd
pushd ${TOP_DIR}
pnpm run format
if [[ $? -ne 0 ]]; then
exit 1
fi
popd
2 changes: 1 addition & 1 deletion bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ fi
TOP_DIR=$(git rev-parse --show-toplevel)

PNPM_VERSION="10.2.0"
NODE_VERSION="23"
NODE_VERSION="22" # See: https://github.com/firebase/genkit/issues/1995
NVM_VERSION="0.40.1"

AUDIENCE="eng"
Expand Down
5 changes: 4 additions & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@
".nx/**",
".trunk/**",
"bazel-*/**",
"genkit-tools/genkit-schema.json",
"go/**",
"node_modules/**",
"py/**",
"third_party/**"
]
},
Expand All @@ -46,7 +49,7 @@
},
"javascript": {
"formatter": {
"arrowParentheses": "asNeeded",
"arrowParentheses": "always",
"attributePosition": "auto",
"bracketSpacing": true,
"jsxQuoteStyle": "double",
Expand Down
Loading
Loading