Skip to content

Commit 674024e

Browse files
authored
Merge pull request #1 from scaleway/luxifer-patch-1
Add CI
2 parents 9cf864c + 38b4247 commit 674024e

File tree

4 files changed

+53
-0
lines changed

4 files changed

+53
-0
lines changed

.github/workflows/go.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# This workflow will build a golang project
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
3+
4+
name: Go
5+
6+
on:
7+
push:
8+
branches: [ "main" ]
9+
pull_request:
10+
branches: [ "main" ]
11+
12+
jobs:
13+
14+
build:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Set up Go
20+
uses: actions/setup-go@v5
21+
with:
22+
go-version: '1.23'
23+
24+
- name: Test
25+
run: make gotest

Makefile

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
include ./Makefile.Common
2+
3+
ALL_MODULES := $(shell find . -type f -name "go.mod" -exec dirname {} \; | sort | grep -E '^./' )
4+
5+
all-modules:
6+
@echo $(ALL_MODULES) | tr ' ' '\n' | sort
7+
8+
# Append root module to all modules
9+
GOMODULES = $(ALL_MODULES)
10+
11+
# Define a delegation target for each module
12+
.PHONY: $(GOMODULES)
13+
$(GOMODULES):
14+
@echo "Running target '$(TARGET)' in module '$@'"
15+
$(MAKE) -C $@ $(TARGET)
16+
17+
.PHONY: for-all-target
18+
for-all-target: $(GOMODULES)
19+
20+
.PHONY: gotest
21+
gotest:
22+
@$(MAKE) for-all-target TARGET="test"

Makefile.Common

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
GOCMD?= go
2+
3+
.PHONY: tests
4+
test:
5+
$(GOCMD) test ./...

receiver/scwaudittrail/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include ../../Makefile.Common

0 commit comments

Comments
 (0)