From 35a2af04ebc90ab50094d64191de78f944f392ec Mon Sep 17 00:00:00 2001 From: Thibault VINCENT Date: Mon, 19 Sep 2022 14:24:25 +0200 Subject: [PATCH] ci: run various tests on release --- .github/workflows/release.yml | 57 +++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a85b6f9..7d7a968 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,6 +12,63 @@ env: COMMIT_EMAIL: monkeynator@enix.io jobs: + tests: + name: Tests + runs-on: ubuntu-latest + steps: + - name: Create KinD cluster + uses: engineerd/setup-kind@v0.5.0 + with: + version: v0.15.0 + + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Set up Golang + uses: actions/setup-go@v3 + with: + go-version-file: go.mod + check-latest: true + + - name: Set up Helm + uses: azure/setup-helm@v3 + with: + version: v3.9.4 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: ~3.10 + + - name: Set up chart-testing + uses: helm/chart-testing-action@v2.3.0 + + - name: Run golangci-lint + uses: golangci/golangci-lint-action@v3 + with: + version: latest + args: --timeout 3m --verbose + skip-cache: true + + - name: Run unit tests + run: | + kubectl cluster-info + go test -v -failfast -timeout 1m -coverprofile=coverage.cov ./internal + go tool cover -html=coverage.cov -o coverage.html + + - name: Run hadolint + id: hadolint + uses: hadolint/hadolint-action@v2.1.0 + + - name: Run chart-testing (lint) + run: | + ct lint --chart-dirs deploy/charts --target-branch ${{ github.base_ref }} \ + --validate-maintainers=false --check-version-increment=false + + # FIXME + #- name: Run chart-testing (install) + # run: ct install --chart-dirs deploy/charts + semver: name: Semantic Version runs-on: ubuntu-latest