Skip to content

add goshare example #284

add goshare example

add goshare example #284

Workflow file for this run

name: test python flux-operator
on:
pull_request: []
jobs:
basic-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v3
- name: Install zeromq
run: sudo apt-get update && sudo apt-get install -y libsodium-dev libzmq3-dev libczmq-dev
- name: Install fluxoperator python sdk
run: |
cd ./sdk/python/v1alpha1
pip install pytest
pip install -e .
pip install flux-restful-client
cd -
- name: Run basic tests
run: pytest -xs sdk/python/v1alpha1/test/test_*.py
test-python-sdk:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# This is a matrix of test commands and containers, MiniKube is assumed to be running
test: [["python ./sdk/python/v1alpha1/examples/port-forward.py", "ghcr.io/flux-framework/flux-restful-api:latest"],
["python ./sdk/python/v1alpha1/examples/state-pending-jobs-minicluster.py", "ghcr.io/flux-framework/flux-restful-api:latest"],
["python ./sdk/python/v1alpha1/examples/interactive-submit.py", "ghcr.io/flux-framework/flux-restful-api:latest"],
["pytest -xs ./tests/python/test_*.py", "ghcr.io/flux-framework/flux-restful-api:latest"]]
steps:
- name: Checkout the code
uses: actions/checkout@v3
- name: Install zeromq
run: sudo apt-get update && sudo apt-get install -y libsodium-dev libzmq3-dev libczmq-dev
- name: Install fluxoperator python sdk
run: |
cd ./sdk/python/v1alpha1
pip install pytest
pip install -e .
pip install flux-restful-client
cd -
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ^1.18
- name: Start minikube
uses: medyagh/setup-minikube@697f2b7aaed5f70bf2a94ee21a4ec3dde7b12f92 # v0.0.9
- name: Create the namespace
run: kubectl create namespace flux-operator
- name: Pull Docker Containers to MiniKube
env:
container: ${{ matrix.test[1] }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
export SHELL=/bin/bash
eval $(minikube -p minikube docker-env)
minikube ssh docker pull ${container}
make deploy-local
minikube image load ghcr.io/flux-framework/flux-operator:test
kubectl apply -f examples/dist/flux-operator-local.yaml
- name: Test ${{ matrix.test[0] }}
env:
command: ${{ matrix.test[0] }}
run: |
make clean
echo "Running command: ${command}"
${command}