Skip to content

Cloud test with python client #14

Cloud test with python client

Cloud test with python client #14

name: Cloud test with python client
on:
workflow_dispatch:
inputs:
organization_name:
description: Default is hazelcast, but if you would like to run the workflow with your forked repo, set your github username
required: true
default: hazelcast
branch_name:
description: Name of the branch to test client from
required: true
default: master
base_url:
description: Base url of the cloud env. I.e https://api.dev.viridian.hazelcast.cloud
required: true
default: https://api.dev.viridian.hazelcast.cloud
hzVersion:
description: Version of hazelcast
required: true
jobs:
test_cloud_python:
runs-on: ubuntu-latest
name: Cloud tests with python
steps:
- name: Checkout to scripts
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Read Java Config
uses: pietrobolcato/action-read-yaml@9f13718d61111b69f30ab4ac683e67a56d254e1d
id: java-config
with:
config: ${{ github.workspace }}/.github/java-config.yml
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: ${{ steps.java-config.outputs['java-version'] }}
distribution: ${{ steps.java-config.outputs['distribution'] }}
- name: Checkout to ${{ github.event.inputs.branch_name }}
uses: actions/checkout@v2
with:
repository: ${{ github.event.inputs.organization_name }}/hazelcast-python-client
path: client
ref: ${{ github.event.inputs.branch_name }}
- name: Copy the client code to cloud test suites
run: |
cp -a $GITHUB_WORKSPACE/client/hazelcast $GITHUB_WORKSPACE/HazelcastCloudTests/pythonhazelcastcloudtests/hazelcast
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-test.txt
working-directory: HazelcastCloudTests/pythonhazelcastcloudtests
- name: Start RC for Viridian
env:
BASE_URL: ${{ github.event.inputs.base_url }}
API_KEY: ${{ secrets.APIKEY_VIRIDIAN }}
API_SECRET: ${{ secrets.APISECRET_VIRIDIAN }}
run: |
python start_remote_controller.py --use-simple-server &> rc.log &
sleep 30
- name: Run cloud tests
env:
BASE_URL: ${{ github.event.inputs.base_url }}
HZ_VERSION: ${{ github.event.inputs.hzVersion }}
run: |
pytest -o log_cli=true ./cloud_test.py
working-directory: HazelcastCloudTests/pythonhazelcastcloudtests
- uses: actions/upload-artifact@v2
if: always()
with:
name: rc
path: rc.log