Skip to content

Commit 5b23001

Browse files
authored
ci: Add automatic CI (#156)
* ci: Add golangci-lint action to CI * ci: Add go tests action to CI Co-authored-by: jb-abbadie <[email protected]>
1 parent 72aee5e commit 5b23001

File tree

3 files changed

+45
-1
lines changed

3 files changed

+45
-1
lines changed

.github/workflows/go-test.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: go-test
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
16+
- name: Set up Go
17+
uses: actions/setup-go@v2
18+
with:
19+
go-version: 1.17
20+
21+
- name: Build
22+
run: go build -v ./...
23+
24+
- name: Test
25+
run: go test -v ./...

.github/workflows/golangci-lint.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: golangci-lint
2+
on:
3+
push:
4+
tags:
5+
- v*
6+
branches:
7+
- master
8+
- main
9+
pull_request:
10+
jobs:
11+
golangci:
12+
name: lint
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: golangci-lint
17+
uses: golangci/golangci-lint-action@v2
18+
with:
19+
version: v1.45

proxy_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
)
2323

2424
const (
25-
okResponse = "1\n"
25+
okResponse = "1"
2626
)
2727

2828
var goodCfg = &config.Config{

0 commit comments

Comments
 (0)