Skip to content

chore: add failure threshold to deployments #107

chore: add failure threshold to deployments

chore: add failure threshold to deployments #107

name: Lint, Test, Autorelease Charts
on: pull_request
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Set up Helm
uses: azure/setup-helm@v1
with:
version: v3.7.2
- uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Set up chart-testing
uses: helm/[email protected]
- name: Add bitnami repo for dependencies
run: helm repo add bitnami https://charts.bitnami.com/bitnami
- name: Add browserless-chrome repo for dependencies
run: helm repo add browserless-chrome https://charts.sagikazarmark.dev
- name: Run chart-testing (lint)
run: ct lint --all
test:
runs-on: ubuntu-latest
strategy:
matrix:
# When changing versions here, check that the version exists at: https://hub.docker.com/r/kindest/node/tags?page=1&ordering=last_updated
k8s:
- v1.20.2
- v1.21.2
- v1.22.5
- v1.23.3
steps:
- name: Checkout
uses: actions/[email protected]
- name: Set up Helm
uses: azure/setup-helm@v1
with:
version: v3.7.2
- uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Set up chart-testing
uses: helm/[email protected]
- name: Create kind ${{ matrix.k8s }} cluster
uses: helm/[email protected]
with:
node_image: kindest/node:${{ matrix.k8s }}
- name: Add browserless-chrome repo for dependencies
run: helm repo add browserless-chrome https://charts.sagikazarmark.dev
- name: Install PostgreSQL dependency
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami
helm install lightdashdb bitnami/postgresql --set auth.username=lightdash,auth.password=changeme,auth.database=lightdash --set primary.persistence.enabled=false
- name: Run chart-testing (install)
run: ct install --config .github/ct-install.yaml --all
automerge:
needs: [lint, test]
if: ${{ contains(github.event.pull_request.labels, 'merge after testing') }}
runs-on: ubuntu-latest
steps:
- name: automerge
uses: "pascalgn/[email protected]"
env:
MERGE_LABELS: "merge after testing"
MERGE_METHOD: squash
MERGE_COMMIT_MESSAGE: pull-request-title
MERGE_FORKS: false
MERGE_DELETE_BRANCH: true
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"