Skip to content

Commit 5ca1888

Browse files
committed
Add Go version matrix and linting to CI workflow
Updated the GitHub Actions workflow to test against Go versions 1.20, 1.21, and 1.22, and added golangci-lint for code linting. Also added a CI status badge to the README.
1 parent 9779ee7 commit 5ca1888

File tree

2 files changed

+21
-12
lines changed

2 files changed

+21
-12
lines changed

.github/workflows/go.yml

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,31 @@ name: Go
55

66
on:
77
push:
8-
branches: [ "main" ]
8+
branches: ["main"]
99
pull_request:
10-
branches: [ "main" ]
10+
branches: ["main"]
1111

1212
jobs:
13-
1413
build:
1514
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
go-version: ["1.20", "1.21", "1.22"]
1618
steps:
17-
- uses: actions/checkout@v4
19+
- uses: actions/checkout@v4
20+
21+
- name: Set up Go
22+
uses: actions/setup-go@v4
23+
with:
24+
go-version: ${{ matrix.go-version }}
1825

19-
- name: Set up Go
20-
uses: actions/setup-go@v4
21-
with:
22-
go-version: '1.20'
26+
- name: Build
27+
run: go build -v ./...
2328

24-
- name: Build
25-
run: go build -v ./...
29+
- name: Lint
30+
uses: golangci/golangci-lint-action@v3
31+
with:
32+
version: v1.55
2633

27-
- name: Test
28-
run: go test -v ./...
34+
- name: Test
35+
run: go test -v ./...

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# kurdical
22

3+
[![Go](https://github.com/rojcode/kurdical/actions/workflows/go.yml/badge.svg)](https://github.com/rojcode/kurdical/actions/workflows/go.yml)
4+
35
## About the Kurdish Calendar
46

57
The Kurdish calendar is an independent solar calendar system with historical offsets aligned to significant events in Kurdish history.

0 commit comments

Comments
 (0)