Skip to content

Commit 02eceae

Browse files
committed
COH-32107 - Create a GitHub workflow action for running Python examples
1 parent 2f076d7 commit 02eceae

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

.github/workflows/run-examples.yaml

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
6+
on:
7+
workflow_dispatch:
8+
schedule:
9+
- cron: "0 5 * * *"
10+
push:
11+
branches:
12+
- '*'
13+
pull_request:
14+
branches: [ main ]
15+
jobs:
16+
run-examples:
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
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+
50+
- name: Run the example
51+
shell: bash
52+
run: |
53+
python3 basics.py
54+

0 commit comments

Comments
 (0)