Local api infra #14
Workflow file for this run
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
# See https://github.com/helm/chart-testing-action | |
name: Lint and Test Charts | |
on: | |
push: | |
branches: | |
#- main | |
- local_api_infra | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
helm-lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Install chart-testing | |
uses: helm/[email protected] | |
- name: Run chart-testing (lint) | |
run: ct lint --charts ./api/helm-chart --debug | |
helmsman-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: azure/[email protected] | |
- uses: azure/setup-kubectl@v3 | |
- name: Start minikube - if this breaks on local do a 'minikube delete' | |
id: minikube | |
uses: medyagh/setup-minikube@master | |
with: | |
cpus: 2 | |
memory: 2G # 1.9G recommended minimum | |
start-args: '--force' | |
- name: Start everything | |
run: | | |
curl -L https://github.com/Praqma/helmsman/releases/download/v3.17.0/helmsman_3.17.0_linux_amd64.tar.gz | tar zx | |
mv helmsman /usr/local/bin/helmsman | |
helmsman --apply -f ./api/local/helmsman_local.yml -e ./api/local/.env_template | |
- run: kubectl get pods --namespace=api | |
- name: Wait for api to start and health-check | |
run: kubectl wait --for=condition=ready pod -l app.kubernetes.io/name=api --timeout=1000s --namespace=api | |
- name: Cleanup | |
run: | | |
minikube delete | |
if: ${{ always() }} |