Skip to content

Commit 8836406

Browse files
committed
refactor(config): polish
1 parent cd7a9f7 commit 8836406

File tree

14 files changed

+87
-33
lines changed

14 files changed

+87
-33
lines changed

.github/linters/.eslintrc.yml

Whitespace-only changes.

.golangci.yml renamed to .github/linters/.golangci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
run:
66
# which dirs to skip: they won't be analyzed;
77
skip-dirs:
8-
- service/account/proto
8+
- mkit
99
skip-files:
1010
- lib/bad.go
1111

.github/linters/.markdown-lint.yml

Whitespace-only changes.

.github/workflows/linter.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
###########################
3+
###########################
4+
## Linter GitHub Actions ##
5+
###########################
6+
###########################
7+
name: Lint Code Base
8+
9+
#
10+
# Documentation:
11+
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
12+
#
13+
14+
#############################
15+
# Start the job on all push #
16+
#############################
17+
on:
18+
push:
19+
branches-ignore:
20+
- 'master'
21+
22+
###############
23+
# Set the Job #
24+
###############
25+
jobs:
26+
build:
27+
# Name the Job
28+
name: Lint Code Base
29+
# Set the agent to run on
30+
runs-on: ubuntu-latest
31+
32+
##################
33+
# Load all steps #
34+
##################
35+
steps:
36+
##########################
37+
# Checkout the code base #
38+
##########################
39+
- name: Checkout Code
40+
uses: actions/checkout@v2
41+
42+
################################
43+
# Run Linter against code base #
44+
################################
45+
- name: Lint Code Base
46+
uses: docker://github/super-linter:v2.1.0
47+
env:
48+
VALIDATE_ALL_CODEBASE: false
49+
DEFAULT_BRANCH: develop

.github/workflows/pr.yml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ on:
33
pull_request:
44
types: [assigned]
55
jobs:
6-
lint-test:
7-
name: Lint and Test
6+
test:
7+
name: Test
88
runs-on: ubuntu-latest
99
if: |
1010
contains(github.event.commits[0].message, '[skip ci]') == false &&
@@ -15,12 +15,6 @@ jobs:
1515
with:
1616
go-version: 1.14
1717
id: go
18-
- name: Setup Tools
19-
env:
20-
GO111MODULE: off
21-
run: |
22-
go get github.com/golangci/golangci-lint/cmd/golangci-lint
23-
GO111MODULE=on go get github.com/bufbuild/buf/cmd/buf
2418
- name: Check out Code
2519
uses: actions/checkout@v1
2620
- name: Cache go modules
@@ -34,12 +28,6 @@ jobs:
3428
- name: Install Dependencies
3529
if: steps.cache.outputs.cache-hit != 'true'
3630
run: go mod download
37-
- name: Lint
38-
run: |
39-
make lint
40-
# export PATH=$PATH:$(go env GOPATH)/bin
41-
# golangci-lint run
42-
# buf check lint
4331
- name: Unit Test
4432
run: make test-unit
4533
- name: Integration Test

.github/workflows/push.yml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ on:
55
# - "v*.*.*"
66
paths-ignore: ["*.md", "docs", "deploy", "config", ".github", "scripts"]
77
jobs:
8-
lint-test:
9-
name: Lint and Test
8+
test:
9+
name: Test
1010
runs-on: ubuntu-latest
1111
if: |
1212
contains(github.event.commits[0].message, '[skip ci]') == false &&
@@ -17,12 +17,6 @@ jobs:
1717
with:
1818
go-version: 1.14
1919
id: go
20-
- name: Setup Tools
21-
env:
22-
GO111MODULE: off
23-
run: |
24-
go get github.com/golangci/golangci-lint/cmd/golangci-lint
25-
GO111MODULE=on go get github.com/bufbuild/buf/cmd/buf
2620
- name: Check out Code
2721
uses: actions/checkout@v1
2822
- name: Cache go modules
@@ -36,12 +30,6 @@ jobs:
3630
- name: Install Dependencies
3731
if: steps.cache.outputs.cache-hit != 'true'
3832
run: go mod download
39-
- name: Lint
40-
run: |
41-
make lint
42-
# export PATH=$PATH:$(go env GOPATH)/bin
43-
# golangci-lint run
44-
# buf check lint
4533
- name: Unit Test
4634
run: make test-unit
4735
- name: Coverage Test

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@
7878
"go.useLanguageServer": true,
7979
"go.lintTool": "golangci-lint",
8080
"go.lintFlags": [
81-
"--fast"
81+
"--fast",
82+
"--config=.github/linters/.golangci.yml"
8283
],
8384
// Proto
8485
"clang-format.style": "google",

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,10 @@ gomod_lint:
131131
lint lint-%:
132132
@if [ -z $(TARGET) ]; then \
133133
echo "Linting all go"; \
134-
${GOPATH}/bin/golangci-lint run ./... --deadline=5m; \
134+
${GOPATH}/bin/golangci-lint run ./... --deadline=5m --config=.github/linters/.golangci.yml; \
135135
else \
136136
echo "Linting go in ${TARGET}-${TYPE}..."; \
137-
${GOPATH}/bin/golangci-lint run ./${TYPE}/${TARGET}/... ; \
137+
${GOPATH}/bin/golangci-lint run ./${TYPE}/${TARGET}/... --config=.github/linters/.golangci.yml; \
138138
fi
139139

140140
# @clang-format -i $(shell find . -type f -name '*.proto')

config/base/service/account/service.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ spec:
77
# We want the servers to become available even if they're not ready
88
publishNotReadyAddresses: true
99
ports:
10-
- name: grpc-port
10+
- name: grpc-web
11+
appProtocol: grpc-web
1112
port: 8080
1213
protocol: TCP
1314
targetPort: grpc-port

config/base/service/emailer/service.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ spec:
88
publishNotReadyAddresses: true
99
ports:
1010
- name: grpc-port
11+
appProtocol: grpc
1112
port: 8080
1213
protocol: TCP
1314
targetPort: grpc-port

0 commit comments

Comments
 (0)