Skip to content

Commit

Permalink
Feature/add GitHub workflows (#5)
Browse files Browse the repository at this point in the history
* Add .github/workflows

* Rename Github workflows

* Fix workflow names

* Split ci workflow to build and test workflows

* Add Github workflow status badges to README.md
  • Loading branch information
danielkraic authored Aug 8, 2024
1 parent 4a01b40 commit 051caf6
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 1 deletion.
17 changes: 17 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Build

on: [push]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.22"

- name: Build
run: make build-only
19 changes: 19 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Lint

on: [push]

jobs:
golangci:
name: golangci
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: "1.22"

- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.59
17 changes: 17 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Test

on: [push]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.22"

- name: Test
run: make test-only race
20 changes: 20 additions & 0 deletions .github/workflows/vulncheck.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Vulncheck

on: [push]

jobs:
vulncheck:
name: vulncheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: "1.22"

- id: govulncheck
uses: golang/govulncheck-action@v1
with:
go-version-input: "1.22"
go-package: ./...
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ lint:
vulncheck:
govulncheck ./...

build-only: build-service
build-only: build-service build-example-grpc-server

build-service:
CGO_ENABLED=0 GOOS=linux go build $(LDFLAGS) -o $(APP_NAME) ./cmd/service/
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# GRPC REST Proxy

[![Build](https://github.com/eset/grpc-rest-proxy/actions/workflows/build.yaml/badge.svg)](https://github.com/eset/grpc-rest-proxy/actions/workflows/build.yaml)
[![Test](https://github.com/eset/grpc-rest-proxy/actions/workflows/test.yaml/badge.svg)](https://github.com/eset/grpc-rest-proxy/actions/workflows/test.yaml)
[![Lint](https://github.com/eset/grpc-rest-proxy/actions/workflows/lint.yaml/badge.svg)](https://github.com/eset/grpc-rest-proxy/actions/workflows/lint.yaml)
[![Vulncheck](https://github.com/eset/grpc-rest-proxy/actions/workflows/vulncheck.yaml/badge.svg)](https://github.com/eset/grpc-rest-proxy/actions/workflows/vulncheck.yaml)

Copyright © ESET 2024-2028

Service that is automatically translating REST requests to gRPC and sending them to provided endpoint. REST is defined using [Google's proto HTTP annotation](https://github.com/googleapis/googleapis/blob/master/google/api/http.proto). Our implementation is able to load proto descriptors directly from grpc endpoint using server reflection service. Main advantage of this approach is elimination of the need to recompile protobufs or grpc-rest-proxy (to incorporate changes in protos), making translation and maintenance easier.
Expand Down

0 comments on commit 051caf6

Please sign in to comment.