Skip to content

Commit b8170ba

Browse files
committed
build: add GitHub action for tests
1 parent a9c23e2 commit b8170ba

File tree

4 files changed

+49
-2
lines changed

4 files changed

+49
-2
lines changed

.github/workflows/test.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Run tests
2+
3+
# Trigger on push
4+
on:
5+
push:
6+
7+
permissions:
8+
contents: read
9+
10+
defaults:
11+
run:
12+
shell: bash
13+
14+
jobs:
15+
test:
16+
runs-on: ubuntu-24.04
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
21+
- name: Install Go
22+
uses: actions/setup-go@v5
23+
with:
24+
check-latest: true
25+
26+
- name: Print environment
27+
run: |
28+
which go
29+
go env
30+
make vars
31+
32+
- name: Check format
33+
run: make check-format
34+
35+
- name: Check vet
36+
run: make check-vet
37+
38+
- name: Build renku-dev-utils
39+
run: make rdu

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,11 @@ help: ## Display this help.
5252
.PHONY: format
5353
format: ## Format source files
5454
gofmt -l -w .
55+
56+
.PHONY: check-format
57+
check-format: ## Check that sources are correctly formatted
58+
gofmt -d -s . && git diff --exit-code
59+
60+
.PHONY: check-vet
61+
check-vet: ## Check source files with `go vet`
62+
go vet ./...

pkg/k8s/amaltheasession.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func ForciblyDeleteAmaltheaSessions(ctx context.Context, client *dynamic.Dynamic
8989
for _, server := range servers {
9090
err = ForciblyDeleteAmaltheaSession(ctx, client, namespace, server, gvr)
9191
if err != nil {
92-
fmt.Printf("Ignoring error: %w\n", err)
92+
fmt.Printf("Ignoring error: %s\n", err)
9393
}
9494
}
9595

pkg/k8s/jupyterserver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func ForciblyDeleteJupyterServers(ctx context.Context, client *dynamic.DynamicCl
8989
for _, server := range servers {
9090
err = ForciblyDeleteJupyterServer(ctx, client, namespace, server, gvr)
9191
if err != nil {
92-
fmt.Printf("Ignoring error: %w\n", err)
92+
fmt.Printf("Ignoring error: %s\n", err)
9393
}
9494
}
9595

0 commit comments

Comments
 (0)