fix the test script #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Test Functionality of the Mock cli" | ||
on: | ||
pull_request: | ||
paths: | ||
- 'cli/**' | ||
- 'scripts/**' | ||
- 'go.mod' | ||
- 'go.sum' | ||
types: [ labeled ] | ||
branches: [ main ] | ||
push: | ||
paths: | ||
- 'scripts/**' | ||
- 'cli/**' | ||
- '.github/workflows/test-mock.yml' | ||
- 'go.mod' | ||
- 'go.sum' | ||
branches: [ main ] | ||
jobs: | ||
binary: | ||
# if: ${{ github.event.label.name == 'pr/lgtm' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.21.0 | ||
- name: build ksctl | ||
run: | | ||
make install_linux | ||
ksctl version | ||
create: | ||
needs: binary | ||
env: | ||
KSCTL_FAKE_FLAG_ENABLED: "1" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: civo create | ||
run: | | ||
ksctl create civo -n demo -r LON1 --nodeSizeMP "g4s.kube.small" -v --approve | ||
ksctl create ha-civo -n ha-demo --nodeSizeDS "fake.small" --nodeSizeLB "fake.small" --nodeSizeCP "fake.small" --nodeSizeWP "fake.small" -r fake -v --approve | ||
- name: azure create | ||
run: | | ||
ksctl create azure -n demo -r fake --nodeSizeMP "fake" -v --approve | ||
ksctl create ha-azure -n ha-demo --nodeSizeDS "fake" --nodeSizeLB "fake" --nodeSizeCP "fake" --nodeSizeWP "fake" -r fake -v --approve | ||
get: | ||
needs: create | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: civo get | ||
run: | | ||
ksctl get -p civo | ||
- name: azure get | ||
run: | | ||
ksctl get -p azure | ||
- name: all | ||
run: | | ||
ksctl get | ||
switch: | ||
needs: get | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: civo switch | ||
run: | | ||
ksctl switch -p civo -n demo -r LON1 | ||
ksctl switch -p ha-civo -n ha-demo -r LON1 | ||
- name: azure switch | ||
run: | | ||
ksctl switch -p azure -n demo -r fake | ||
ksctl switch -p ha-azure -n ha-demo -r fake | ||
delete: | ||
needs: delete | ||
Check failure on line 83 in .github/workflows/test-mock.yml GitHub Actions / Test Functionality of the Mock cliInvalid workflow file
|
||
runs-on: ubuntu-latest | ||
env: | ||
KSCTL_FAKE_FLAG_ENABLED: "1" | ||
steps: | ||
- name: civo | ||
run: | | ||
ksctl delete civo -n demo -r LON1 | ||
ksctl delete ha-civo -n ha-demo -r LON1 | ||
- name: azure | ||
run: | | ||
ksctl delete azure -n demo -r fake | ||
ksctl delete ha-azure -n ha-demo -r fake |