Skip to content

Commit 1256915

Browse files
[ADD] CI.yaml workflow
1 parent 1469362 commit 1256915

1 file changed

Lines changed: 34 additions & 32 deletions

File tree

‎.github/workflows/ci.yaml‎

Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,45 @@
11
# CICD using Github actions
22

3-
name: CI/CD
3+
name: CI/CD
44

5-
on:
5+
# Exclude the workflow to run on changes to the helm chart
6+
on:
67
push:
78
branches:
89
- main
910
paths-ignore:
1011
- 'helm/**'
1112
- 'k8s/**'
1213
- 'README.md'
14+
15+
jobs:
16+
17+
build:
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
24+
- name: Set up Go 1.22
25+
uses: actions/setup-go@v2
26+
with:
27+
go-version: 1.22
28+
29+
- name: Build
30+
run: go build -o go-web-app
31+
32+
- name: Test
33+
run: go test ./...
1334

14-
jobs:
15-
build:
16-
runs-on: ubuntu-latest
17-
18-
steps:
19-
- name: Checkout repository
20-
uses: actions/checkout@v4
21-
22-
- name: Set up Go 1.22
23-
uses: actions/setup-go@v2
24-
with:
25-
go-version: 1.22
26-
27-
- name: Build
28-
run: go build -o go-web-app
29-
30-
- name: Test
31-
run: go test ./...
32-
33-
code-quality:
34-
runs-on: ubuntu-latest
35-
36-
steps:
37-
- name: Checkout repository
38-
uses: actions/checkout@v4
39-
40-
- name: Run golangci-lint
41-
uses: golangci/golangci-lint-actions@v6
42-
with:
43-
version: v1.56.2
35+
code-quality:
36+
runs-on: ubuntu-latest
37+
38+
steps:
39+
- name: Checkout repository
40+
uses: actions/checkout@v4
41+
42+
- name: Run golangci-lint
43+
uses: golangci/golangci-lint-action@v6
44+
with:
45+
version: v1.56.2

0 commit comments

Comments
 (0)