Skip to content

Commit e024b78

Browse files
committed
Separate out running with current branch vs released version of client
1 parent 36dc4e3 commit e024b78

File tree

2 files changed

+55
-48
lines changed

2 files changed

+55
-48
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Copyright 2025, Oracle Corporation and/or its affiliates.
2+
# Licensed under the Universal Permissive License v 1.0 as shown at
3+
# https://oss.oracle.com/licenses/upl.
4+
5+
name: Run Examples with released client
6+
on:
7+
workflow_dispatch:
8+
schedule:
9+
- cron: "0 5 * * *"
10+
jobs:
11+
run-examples-with-latest-release:
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
python-version: ["3.9.x", "3.10.x", "3.11.x", "3.12.x", "3.13.x"]
16+
os: [ubuntu-latest]
17+
coherence-image:
18+
- ghcr.io/oracle/coherence-ce
19+
coherenceVersion:
20+
- 25.03.1
21+
runs-on: ${{ matrix.os }}
22+
steps:
23+
- name: Get Docker Images
24+
shell: bash
25+
run: |
26+
docker pull ${{ matrix.coherence-image }}:${{ matrix.coherenceVersion }}
27+
28+
- uses: actions/checkout@v4
29+
- uses: actions/setup-python@v5
30+
with:
31+
python-version: ${{ matrix.python-version }}
32+
33+
- name: Install Coherence Python Client
34+
shell: bash
35+
run: |
36+
python -m pip install --upgrade pip
37+
pip install coherence-client
38+
pip install sentence-transformers # required for vector_search example
39+
40+
- name: Start the Server using image
41+
shell: bash
42+
run: |
43+
docker run -d -p 1408:1408 ${{ matrix.coherence-image }}:${{ matrix.coherenceVersion }}
44+
sleep 20
45+
46+
- name: Run the example
47+
shell: bash
48+
run: |
49+
cd examples
50+
for file in *.py; do
51+
echo "Run example ${file}"
52+
COHERENCE_CLIENT_REQUEST_TIMEOUT=180.0 python3 $file
53+
echo "==== Done running example ${file} ======"
54+
done

.github/workflows/run-examples.yaml

Lines changed: 1 addition & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -5,60 +5,13 @@
55
name: Run Examples
66
on:
77
workflow_dispatch:
8-
schedule:
9-
- cron: "0 5 * * *"
108
push:
119
branches:
1210
- '*'
1311
pull_request:
1412
branches: [ main ]
1513
jobs:
16-
run-examples-with-latest-release:
17-
strategy:
18-
fail-fast: false
19-
matrix:
20-
python-version: ["3.9.x"]
21-
os: [ubuntu-latest]
22-
coherence-image:
23-
- ghcr.io/oracle/coherence-ce
24-
coherenceVersion:
25-
- 25.03.1
26-
runs-on: ${{ matrix.os }}
27-
steps:
28-
- name: Get Docker Images
29-
shell: bash
30-
run: |
31-
docker pull ${{ matrix.coherence-image }}:${{ matrix.coherenceVersion }}
32-
33-
- uses: actions/checkout@v4
34-
- uses: actions/setup-python@v5
35-
with:
36-
python-version: ${{ matrix.python-version }}
37-
38-
- name: Install Coherence Python Client
39-
shell: bash
40-
run: |
41-
python -m pip install --upgrade pip
42-
pip install coherence-client
43-
pip install sentence-transformers # required for vector_search example
44-
45-
- name: Start the Server using image
46-
shell: bash
47-
run: |
48-
docker run -d -p 1408:1408 ${{ matrix.coherence-image }}:${{ matrix.coherenceVersion }}
49-
sleep 20
50-
51-
- name: Run the example
52-
shell: bash
53-
run: |
54-
cd examples
55-
for file in *.py; do
56-
echo "Run example ${file}"
57-
COHERENCE_CLIENT_REQUEST_TIMEOUT=180.0 python3 $file
58-
echo "==== Done running example ${file} ======"
59-
done
60-
# Now run example with current branch
61-
run-examples-with-main:
14+
run-examples:
6215
strategy:
6316
fail-fast: false
6417
matrix:

0 commit comments

Comments
 (0)