Skip to content

sample-cluster: create single simple node cluster #1

sample-cluster: create single simple node cluster

sample-cluster: create single simple node cluster #1

name: Plugin Go test
on:
pull_request:
defaults:
run:
# reference: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell
shell: bash --noprofile --norc -eo pipefail -x {0}
# cancel the in-progress workflow when PR is refreshed.
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true
jobs:
default-namespace:
runs-on: ubuntu-20.04
steps:
- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: setup golang
uses: actions/setup-go@v2
with:
go-version: 1.19
- name: setup minikube
uses: manusa/actions-setup-minikube@v2.4.2
with:
minikube version: "v1.23.2"
kubernetes version: "v1.22.2"
start args: --memory 6g --cpus=2
github token: ${{ secrets.GITHUB_TOKEN }}
- name: build the binary and run unit tests
run: |
make build
sudo cp bin/kubectl-rook-ceph /usr/local/bin/kubectl-rook_ceph
make test
- name: single node cluster
env:
CREATE_SINGLE_NODE_CEPH_CLUSTER: true
run: |
set -ex
kubect create sample-cluster
// wait for the operator pod to be ready
tests/github-action-helper.sh wait_for_operator_pod_to_be_ready_state_default
// wait for the osd pod to be ready
tests/github-action-helper.sh wait_for_pod_to_be_ready_state_default