Skip to content

Commit 2d24bfb

Browse files
authored
Merge pull request #9 from BoostyLabs/ci_added
Create go.yml
2 parents 628d31d + 777fb2b commit 2d24bfb

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

.github/workflows/go.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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+
env:
13+
GO_VERSION: 1.22.x
14+
15+
jobs:
16+
17+
build:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Set up Go
23+
uses: actions/setup-go@v5
24+
with:
25+
go-version: ${{ env.GO_VERSION }}
26+
27+
- name: Check go mod
28+
run: |
29+
go mod tidy
30+
git diff --exit-code go.mod
31+
32+
- name: Build
33+
run: go build -v ./...
34+
35+
- name: Test
36+
run: go test -v ./...
37+
38+
- name: Lint
39+
uses: golangci/golangci-lint-action@v6.1.1
40+
with:
41+
version: latest
42+
skip-build-cache: true
43+
skip-pkg-cache: true

0 commit comments

Comments
 (0)