add support for lint and test locally #175
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
--- | |
name: Lint | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Set up Helm | |
uses: azure/setup-helm@v1 | |
with: | |
version: v3.10.0 | |
- uses: actions/setup-python@v3 | |
with: | |
python-version: 3.7 | |
- name: Pre-Commit Checks | |
uses: pre-commit/action@v3.0.0 | |
- name: Set up chart-testing | |
uses: helm/chart-testing-action@v2.2.1 | |
with: | |
version: v3.6.0 | |
- name: Create kind cluster | |
uses: helm/kind-action@v1 | |
- name: Run chart-testing (lint) | |
run: | | |
ct lint --target-branch \ | |
${{ github.event.repository.default_branch }} \ | |
--check-version-increment=false \ | |
--validate-maintainers=false | |
lint-templates: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Set up Helm | |
uses: azure/setup-helm@v1 | |
with: | |
version: v3.10.0 | |
- name: Create kind cluster | |
uses: helm/kind-action@v1 | |
- name: Install cert-manager | |
run: | | |
kubectl create namespace cert-manager | |
helm repo add jetstack https://charts.jetstack.io | |
helm repo update | |
helm install cert-manager --namespace cert-manager jetstack/cert-manager \ | |
--set installCRDs=true \ | |
--set extraArgs[0]=--enable-certificate-owner-ref=true | |
- name: Install Traefik | |
run: | | |
helm repo add traefik https://traefik.github.io/charts | |
helm repo update | |
helm install traefik traefik/traefik \ | |
--namespace=traefik --create-namespace | |
- name: Try templating default settings | |
run: | | |
helm template s3gw charts/s3gw \ | |
--set publicDomain="example.com" \ | |
--set ui.publicDomain="example.com" \ | |
> default.yaml | |
kubectl apply -f default.yaml --dry-run=server | |
- name: Try templating private registry | |
run: | | |
helm template s3gw charts/s3gw \ | |
-f tests/private-registry.yaml > private-registry.yaml | |
kubectl apply -f private-registry.yaml --dry-run=server |