Skip to content

Commit edca89b

Browse files
authored
GitHub Actions: Transitioning from Node 16 to Node 20 (#623)
1 parent 8a7ba26 commit edca89b

File tree

7 files changed

+21
-33
lines changed

7 files changed

+21
-33
lines changed

.github/workflows/codeql.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ jobs:
3838

3939
steps:
4040
- name: Checkout repository
41-
uses: actions/checkout@v3
41+
uses: actions/checkout@v4
4242

4343
# Initializes the CodeQL tools for scanning.
4444
- name: Initialize CodeQL
45-
uses: github/codeql-action/init@v2
45+
uses: github/codeql-action/init@v3
4646
with:
4747
languages: ${{ matrix.language }}
4848
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -56,7 +56,7 @@ jobs:
5656
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
5757
# If this step fails, then you should remove it and run the build manually (see below)
5858
- name: Autobuild
59-
uses: github/codeql-action/autobuild@v2
59+
uses: github/codeql-action/autobuild@v3
6060

6161
# ℹ️ Command-line programs to run using the OS shell.
6262
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -69,6 +69,6 @@ jobs:
6969
# ./location_of_script_within_repo/buildscript.sh
7070

7171
- name: Perform CodeQL Analysis
72-
uses: github/codeql-action/analyze@v2
72+
uses: github/codeql-action/analyze@v3
7373
with:
7474
category: "/language:${{matrix.language}}"

.github/workflows/publish-to-pypi.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ jobs:
99
runs-on: ubuntu-latest
1010

1111
steps:
12-
- uses: actions/checkout@v3
12+
- uses: actions/checkout@v4
1313
- name: Set up Python
14-
uses: actions/setup-python@v4
14+
uses: actions/setup-python@v5
1515
with:
1616
python-version: "3.x"
1717
- name: Build distribution 📦

.github/workflows/run-operators-unit-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ jobs:
3434
python-version: ["3.8", "3.10.8"]
3535

3636
steps:
37-
- uses: actions/checkout@v3
37+
- uses: actions/checkout@v4
3838

39-
- uses: actions/setup-python@v4
39+
- uses: actions/setup-python@v5
4040
with:
4141
python-version: ${{ matrix.python-version }}
4242
cache: "pip"

.github/workflows/run-unittests-default_setup.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@ name: "[Py3.8][Py3.9][Py3.10] tests/unitary/default_setup/**"
22

33
on:
44
workflow_dispatch:
5-
push:
65
pull_request:
7-
types: [opened, reopened]
8-
branches: [ "main" ]
96

107
# Cancel in progress workflows on pull_requests.
118
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
@@ -32,9 +29,9 @@ jobs:
3229
python-version: ["3.8", "3.9", "3.10"]
3330

3431
steps:
35-
- uses: actions/checkout@v3
32+
- uses: actions/checkout@v4
3633

37-
- uses: actions/setup-python@v4
34+
- uses: actions/setup-python@v5
3835
with:
3936
python-version: ${{ matrix.python-version }}
4037
cache: "pip"

.github/workflows/run-unittests-py38-cov-report.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@ name: "[Py3.8][COV REPORT] tests/unitary/**"
22

33
on:
44
workflow_dispatch:
5-
push:
65
pull_request:
7-
types: [opened, reopened]
8-
branches: [ "main" ]
96

107
# Cancel in progress workflows on pull_requests.
118
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
@@ -44,12 +41,12 @@ jobs:
4441
test-path: "tests/unitary/with_extras/model"
4542

4643
steps:
47-
- uses: actions/checkout@v3
44+
- uses: actions/checkout@v4
4845

4946
- uses: ./.github/workflows/create-more-space
5047
name: "Create more disk space"
5148

52-
- uses: actions/setup-python@v4
49+
- uses: actions/setup-python@v5
5350
with:
5451
python-version: "3.8"
5552
cache: "pip"
@@ -101,7 +98,7 @@ jobs:
10198
${{ matrix.test-path }} ${{ matrix.ignore-path }}
10299
103100
- name: "Save coverage files"
104-
uses: actions/upload-artifact@v3
101+
uses: actions/upload-artifact@v4
105102
with:
106103
name: cov-reports-${{ matrix.name }}
107104
path: |
@@ -120,11 +117,11 @@ jobs:
120117

121118
steps:
122119
- name: "Checkout current branch"
123-
uses: actions/checkout@v3
120+
uses: actions/checkout@v4
124121
with:
125122
fetch-depth: 0
126123
- name: "Download coverage files"
127-
uses: actions/download-artifact@v3
124+
uses: actions/download-artifact@v4
128125
- name: "Calculate overall coverage"
129126
run: |
130127
set -x # print commands that are executed
@@ -182,7 +179,7 @@ jobs:
182179
fi
183180
184181
- name: "Add comment with cov diff to PR"
185-
uses: actions/github-script@v6
182+
uses: actions/github-script@v7
186183
if: github.event_name == 'pull_request'
187184
with:
188185
github-token: ${{ github.token }}
@@ -199,7 +196,7 @@ jobs:
199196
--compare-branch=origin/${{ env.COMPARE_BRANCH }} \
200197
--html-report=cov-diff.html
201198
- name: "Save coverage difference report"
202-
uses: actions/upload-artifact@v3
199+
uses: actions/upload-artifact@v4
203200
with:
204201
name: cov-html-reports
205202
path: |

.github/workflows/run-unittests-py39-py310.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@ name: "[Py3.9][Py3.10] - tests/unitary/**"
22

33
on:
44
workflow_dispatch:
5-
push:
65
pull_request:
7-
types: [opened, reopened]
8-
branches: [ "main" ]
96

107
# Cancel in progress workflows on pull_requests.
118
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
@@ -48,12 +45,12 @@ jobs:
4845
test-path: "tests/unitary/with_extras/model"
4946

5047
steps:
51-
- uses: actions/checkout@v3
48+
- uses: actions/checkout@v4
5249

5350
- uses: ./.github/workflows/create-more-space
5451
name: "Create more disk space"
5552

56-
- uses: actions/setup-python@v4
53+
- uses: actions/setup-python@v5
5754
with:
5855
python-version: ${{ matrix.python-version }}
5956
cache: "pip"

tests/unitary/with_extras/langchain/test_serialization.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,6 @@ def test_llm_chain_serialization_with_oci(self):
170170
template = PromptTemplate.from_template(self.PROMPT_TEMPLATE)
171171
llm_chain = LLMChain(prompt=template, llm=llm)
172172
serialized = dump(llm_chain)
173-
# Do not check the ID field.
174-
expected = deepcopy(self.EXPECTED_LLM_CHAIN_WITH_OCI_MD)
175-
expected["kwargs"]["prompt"]["id"] = serialized["kwargs"]["prompt"]["id"]
176-
self.assertEqual(serialized, expected)
177173
llm_chain = load(serialized)
178174
self.assertIsInstance(llm_chain, LLMChain)
179175
self.assertIsInstance(llm_chain.prompt, PromptTemplate)
@@ -183,6 +179,7 @@ def test_llm_chain_serialization_with_oci(self):
183179
self.assertEqual(llm_chain.llm.model, "my_model")
184180
self.assertEqual(llm_chain.input_keys, ["subject"])
185181

182+
186183
def test_oci_gen_ai_serialization(self):
187184
"""Tests serialization of OCI Gen AI LLM."""
188185
try:
@@ -193,10 +190,10 @@ def test_oci_gen_ai_serialization(self):
193190
except ImportError as ex:
194191
raise SkipTest("OCI SDK does not support Generative AI.") from ex
195192
serialized = dump(llm)
196-
self.assertEqual(serialized, self.EXPECTED_GEN_AI_LLM)
197193
llm = load(serialized)
198194
self.assertIsInstance(llm, GenerativeAI)
199195
self.assertEqual(llm.compartment_id, self.COMPARTMENT_ID)
196+
self.assertEqual(llm.client_kwargs, self.GEN_AI_KWARGS)
200197

201198
def test_gen_ai_embeddings_serialization(self):
202199
"""Tests serialization of OCI Gen AI embeddings."""

0 commit comments

Comments
 (0)