This repository has been archived by the owner on Sep 24, 2024. It is now read-only.
chore(deps-dev): update github/codeql-action digest to f0a1281 #190
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: pr-build | |
on: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
jobs: | |
e2e: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 | |
- name: Setup Go | |
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 #v3.5.0 | |
with: | |
go-version: 1.20.x | |
- name: Restore Go cache | |
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: fmt | |
run: make fmt | |
- name: vet | |
run: make vet | |
- name: lint | |
run: make lint | |
- name: test | |
run: make test | |
- name: build | |
run: make build | |
- name: Send go coverage report | |
uses: shogo82148/actions-goveralls@31ee804b8576ae49f6dc3caa22591bc5080e7920 #v1.6.0 | |
with: | |
path-to-profile: coverage.out | |
- name: Check if working tree is dirty | |
run: | | |
if [[ $(git diff --stat) != '' ]]; then | |
git --no-pager diff | |
echo 'run <make test> and commit changes' | |
exit 1 | |
fi | |
- name: Build container image | |
run: | | |
make docker-build | |
- name: Setup Kubernetes | |
uses: engineerd/setup-kind@aa272fe2a7309878ffc2a81c56cfe3ef108ae7d0 #v0.5.0 | |
with: | |
version: v0.17.0 | |
- name: Load test image | |
run: kind load docker-image k8sprom-patch-controller:latest | |
- name: Deploy controller | |
run: make deploy | |
- name: Setup prometheus | |
run: bash -e ./scripts/e2e/setup-prometheus.sh | |
- name: Run k8sprom-patch-controller tests | |
run: bash -e ./scripts/e2e/test.sh | |
- name: Debug failure | |
if: failure() | |
run: | | |
kubectl -n kube-system describe pods | |
kubectl -n prometheus get pods | |
kubectl -n k8sprom-patch-system describe pods | |
kubectl -n k8sprom-patch-system get all | |
kubectl -n k8sprom-patch-system logs deploy/k8sprom-patch-controller | |
kubectl -n default get prometheuspatchrules -o yaml |