Skip to content

Commit e31547b

Browse files
committed
ci: ignore build/e2e test on dependabot
1 parent 97a0eaf commit e31547b

File tree

4 files changed

+18
-13
lines changed

4 files changed

+18
-13
lines changed

.github/workflows/ci.yaml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ jobs:
6464

6565
e2e:
6666
name: E2E Test
67+
if: github.actor!= 'dependabot-preview[bot]'
6768
needs:
6869
- verify
6970
- image-build
@@ -75,12 +76,6 @@ jobs:
7576
steps:
7677
- name: Checkout
7778
uses: actions/checkout@v4
78-
- name: Login to GitHub Container Registry
79-
uses: docker/login-action@v3
80-
with:
81-
registry: ghcr.io
82-
username: ${{ github.actor }}
83-
password: ${{ secrets.GITHUB_TOKEN }}
8479
- name: Setup Skaffold
8580
uses: heypigeonhq/setup-skaffold@v1.0.0
8681
with:
@@ -90,9 +85,13 @@ jobs:
9085
- name: Bootstrap
9186
run: |
9287
kustomize build --enable-helm config/bootstrap | kubectl apply -f -
93-
kubectl --namespace cert-manager wait --for=condition=Available deployment/cert-manager-webhook
88+
kubectl wait deployment/cert-manager-webhook \
89+
--namespace cert-manager \
90+
--for=condition=Available \
91+
--timeout=5m
9492
kubectl get namespace sandbox 2>/dev/null || kubectl create namespace sandbox
9593
mkdir build/
94+
skaffold config set kind-disable-load true
9695
- name: Download image tags
9796
uses: actions/download-artifact@v4
9897
with:
@@ -112,6 +111,7 @@ jobs:
112111

113112
coverage:
114113
name: Coverage Report
114+
if: github.actor!= 'dependabot-preview[bot]'
115115
needs:
116116
- verify
117117
- e2e
@@ -121,14 +121,12 @@ jobs:
121121
uses: actions/download-artifact@v4
122122
with:
123123
name: coverage
124-
path: build
125124
- name: Download E2E coverage report
126125
uses: actions/download-artifact@v4
127126
with:
128127
name: coverage-e2e
129-
path: build
130128
- name: Upload coverage reports to Codecov
131129
uses: codecov/codecov-action@v5
132130
with:
133131
token: ${{ secrets.CODECOV_TOKEN }}
134-
files: build/coverage.xml,build/coverage.e2e.xml
132+
files: coverage.xml,coverage.e2e.xml

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ fetch-coverage: $(GOCOVERDIR)
3838

3939
config/rbac/role.yaml:
4040
$(CONTROLLER_GEN) > config/rbac/role.yaml \
41-
paths=./pkg/... \
41+
paths={./pkg/...,./cmd/...} \
4242
rbac:roleName=etcd-operator \
4343
output:rbac:stdout
4444

@@ -54,4 +54,4 @@ config/e2e/role.yaml: config/rbac/role.yaml
5454

5555
config/e2e/role-binding.yaml: config/rbac/role-binding.yaml
5656
mkdir -p config/e2e
57-
yq -r '.roleRef.kind = "Role"' config/rbac/role-binding.yaml >config/e2e/role-binding.yaml
57+
yq -r '.kind = "RoleBinding" | .roleRef.kind = "Role"' config/rbac/role-binding.yaml >config/e2e/role-binding.yaml

config/e2e/deployment.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ spec:
1515
volumeMounts:
1616
- name: coverage
1717
mountPath: /var/coverage
18+
resources:
19+
limits:
20+
cpu: 125m
21+
memory: 128M
22+
requests:
23+
cpu: 125m
24+
memory: 128M
1825
volumes:
1926
- name: coverage
2027
emptyDir: {}

config/e2e/role-binding.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apiVersion: rbac.authorization.k8s.io/v1
2-
kind: ClusterRoleBinding
2+
kind: RoleBinding
33
metadata:
44
name: etcd-operator
55
roleRef:

0 commit comments

Comments
 (0)