Skip to content

Commit 9ef7bc6

Browse files
committed
ci: update CI
Signed-off-by: Ardika Bagus <[email protected]>
1 parent f6eb1cc commit 9ef7bc6

File tree

4 files changed

+26
-20
lines changed

4 files changed

+26
-20
lines changed

.github/workflows/ci.yml renamed to .github/workflows/test.yml

+17-17
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
1-
name: CI
1+
name: Test
22

33
on:
44
push:
55
branches:
6-
- master
6+
- master
7+
paths:
8+
- "**/*.go"
79
pull_request:
10+
branches:
11+
- master
12+
paths:
13+
- "**/*.go"
814

915
jobs:
10-
test:
11-
strategy:
12-
matrix:
13-
go-version: [ ">=1.18.0" ]
14-
os: [ ubuntu-latest ]
15-
runs-on: ${{ matrix.os }}
16+
audit:
17+
name: Auditing the code
18+
runs-on: ubuntu-latest
1619
steps:
1720
- name: Checkout code
18-
uses: actions/checkout@v2
21+
uses: actions/checkout@v3
1922
with:
20-
fetch-depth: 1
23+
fetch-depth: 0
2124

2225
- name: Set up Go
23-
uses: actions/setup-go@v2
26+
uses: actions/setup-go@v4
2427
with:
25-
go-version: ${{ matrix.go-version }}
26-
27-
- name: Lint
28-
run: make lint
28+
go-version: ^1.20.x
2929

30-
- name: Test
30+
- name: Run Audit
3131
run: |
32-
eval $(ssh-agent)
32+
make lint
3333
make test
3434
3535
- name: Upload coverage to Codecov

.golangci.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
run:
2+
tests: true
3+
timeout: 5m
4+
go: "1.20"
5+
16
linters:
27
enable:
38
- errcheck
@@ -9,5 +14,5 @@ linters-settings:
914
errcheck:
1015
# exclude: errcheck-exclude.txt
1116
exclude-functions:
12-
- (io.Closer).Close
13-
- (net/http.ResponseWriter).Write
17+
- (io.Closer).Close
18+
- (net/http.ResponseWriter).Write

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
GOLANGCI_VERSION = 1.52.2
1+
GOLANGCI_VERSION = 1.53.3
22
OUTDIR := bin
33
PATH := bin:$(PATH)
44
SHELL := env PATH=$(PATH) /bin/bash

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# go-stdlib
22

3+
[![Test](https://github.com/ardikabs/go-stdlib/actions/workflows/test.yaml/badge.svg?branch=master)](https://github.com/ardikabs/go-stdlib/actions/workflows/test.yaml)
34
[![Go Reference](https://pkg.go.dev/badge/github.com/ardikabs/go-stdlib.svg)](https://pkg.go.dev/github.com/ardikabs/go-stdlib)
45
[![Go Report Card](https://goreportcard.com/badge/github.com/ardikabs/go-stdlib)](https://goreportcard.com/report/github.com/ardikabs/go-stdlib)
56
![Go Version](https://img.shields.io/badge/go%20version-%3E=1.20-61CFDD.svg?style=flat-square)

0 commit comments

Comments
 (0)