generated from lazybytez/general-template
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (44 loc) · 1.09 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Continues integration workflow to continuously check
# code quality and run tests before merging PRs
name: CI
on:
pull_request:
push:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
env:
IS_CI: true
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.22.2
- name: Checkout repository
uses: actions/checkout@v3
- name: Install dependencies
run: make install
- name: Run Go linters
uses: golangci/golangci-lint-action@v4
with:
version: v1.57.2
skip-cache: true
tests:
runs-on: ubuntu-latest
env:
IS_CI: true
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.22.2
- name: Checkout repository
uses: actions/checkout@v3
- name: Install dependencies
run: make install
- name: Build project
run: make build
- name: Run Go tests
run: go test -race -covermode=atomic -coverpkg=all -coverprofile=coverage.out ./...