ci: run various tests on release

This commit is contained in:
Thibault VINCENT
2022-09-19 15:12:23 +02:00
parent cad5451a4c
commit 35a2af04eb
+57
View File
@@ -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