Skip to content

Commit 1bcee57

Browse files
ci: Add github actions
Signed-off-by: Anthony TREUILLIER <anthony.treuillier@scality.com>
1 parent e4f030f commit 1bcee57

File tree

3 files changed

+47
-0
lines changed

3 files changed

+47
-0
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @scality/metalk8s

.github/workflows/pre-merge.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: "Pre Merge"
2+
3+
on:
4+
workflow_dispatch:
5+
6+
pull_request:
7+
branches:
8+
- main
9+
10+
jobs:
11+
lint:
12+
runs-on: ubuntu-24.04
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
- name: Set up Go
17+
uses: actions/setup-go@v6
18+
with:
19+
go-version-file: 'go.mod'
20+
- name: Run linters
21+
uses: golangci/golangci-lint-action@v8
22+
with:
23+
version: v2.5.0
24+
25+
test:
26+
uses: ./.github/workflows/test.yaml
27+
secrets: inherit

.github/workflows/test.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Tests
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
test:
8+
name: Run on Ubuntu
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Clone the code
12+
uses: actions/checkout@v4
13+
- name: Set up Go
14+
uses: actions/setup-go@v6
15+
with:
16+
go-version-file: 'go.mod'
17+
- name: Running Tests
18+
run: |
19+
go test -v -race ./...

0 commit comments

Comments
 (0)