Skip to content

test(agent): add more test cases for k8s apis #19

test(agent): add more test cases for k8s apis

test(agent): add more test cases for k8s apis #19

Workflow file for this run

name: Chart CI
on:
pull_request:
types:
- opened
- synchronize
push:
branches:
- main
jobs:
lint-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/setup-helm@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
check-latest: true
- name: Set up chart-testing
uses: helm/chart-testing-action@v2
- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --chart-dirs deploy/charts/ --target-branch ${{ github.event.repository.default_branch }})
if [[ -n "$changed" ]]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
fi
- name: Run chart-testing (lint)
if: steps.list-changed.outputs.changed == 'true'
run: ct lint --chart-dirs deploy/charts/ --charts deploy/charts/kubevirtbmc
- name: Create kind cluster
if: steps.list-changed.outputs.changed == 'true'
uses: helm/kind-action@v1
- name: Install cert-manager
if: steps.list-changed.outputs.changed == 'true'
run: helm install cert-manager cert-manager --repo=https://charts.jetstack.io --namespace=cert-manager --create-namespace --version=v1.14.2 --set=installCRDs=true --wait
- name: Run chart-testing (install)
if: steps.list-changed.outputs.changed == 'true'
run: ct install --chart-dirs deploy/charts/ --charts deploy/charts/kubevirtbmc
release:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: lint-test
# depending on default permission settings for your org (contents being read-only or read-write for workloads), you will have to add permissions
# see: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Install Helm
uses: azure/setup-helm@v4
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1
with:
charts_dir: deploy/charts
mark_as_latest: false
pages_branch: gh-pages
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"