-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: upgrade buf and goreleaser (#495)
* build: upgrade buf and goreleaser * build: update workflows * lint: fix lint issues * build: change action version
- Loading branch information
Showing
28 changed files
with
80 additions
and
174 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,13 @@ | ||
Raystack takes the security of our software products and services seriously. | ||
|
||
If you believe you have found a security vulnerability in this project, you can report it to us directly using [private vulnerability reporting][]. | ||
|
||
- Include a description of your investigation of the this project's codebase and why you believe an exploit is possible. | ||
- POCs and links to code are greatly encouraged. | ||
- Such reports are not eligible for a bounty reward. | ||
|
||
**Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.** | ||
|
||
Thanks for helping make GitHub safe for everyone. | ||
|
||
[private vulnerability reporting]: https://github.com/raystack/meteor/security/advisories |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 1,30 @@ | ||
name: lint | ||
|
||
name: Lint | ||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "**.go" | ||
- go.mod | ||
- go.sum | ||
pull_request: | ||
paths: | ||
- "**.go" | ||
- go.mod | ||
- go.sum | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@v4 | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: "1.20" | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Run linter | ||
uses: golangci/golangci-lint-action@v3 | ||
go-version-file: "go.mod" | ||
|
||
- name: Run checks | ||
uses: golangci/golangci-lint-action@v6 | ||
with: | ||
version: v1.53 | ||
version: v1.60 | ||
args: --timeout=5m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 1,4 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
@@ -10,12 9,11 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.20' | ||
cache: true | ||
go-version-file: "go.mod" | ||
- name: Install dependencies | ||
run: sudo apt-get install build-essential | ||
- name: Run Test | ||
|
@@ -32,12 30,12 @@ jobs: | |
plugins: ${{ steps.set-matrix.outputs.plugins }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
- id: set-matrix | ||
run: | | ||
echo "plugins=$(find plugins -mindepth 2 -maxdepth 2 -type d | sed 's/plugins\///' | awk 'BEGIN{printf "["} {printf "%s\"%s\"",sep,$0; sep=","} END{print ",\".\"]"}')" >> $GITHUB_OUTPUT | ||
plugins-test: | ||
plugins: | ||
needs: pretest | ||
runs-on: ubuntu-latest | ||
if: | | ||
|
@@ -49,12 47,11 @@ jobs: | |
plugins: ${{ fromJson(needs.pretest.outputs.plugins) }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.20' | ||
cache: true | ||
go-version-file: "go.mod" | ||
- name: Install dependencies | ||
run: sudo apt-get install build-essential | ||
- name: Run Test | ||
|
@@ -67,15 64,14 @@ jobs: | |
|
||
coverage: | ||
runs-on: ubuntu-latest | ||
needs: [test, plugins-test] | ||
needs: [test, plugins] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.20' | ||
cache: true | ||
go-version-file: "go.mod" | ||
- name: Download coverage | ||
uses: actions/download-artifact@v3 | ||
with: | ||
|
@@ -89,4 85,4 @@ jobs: | |
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
go install github.com/mattn/[email protected] | ||
goveralls -coverprofile=$(ls -1 coverage*.out | paste -sd "," -) -service=github | ||
goveralls -coverprofile=$(ls -1 coverage*.out | paste -sd "," -) -service=github |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 1,7 @@ | ||
NAME="github.com/raystack/meteor" | ||
VERSION=$(shell git describe --always --tags 2>/dev/null) | ||
COVERFILE="/tmp/app.coverprofile" | ||
PROTON_COMMIT := "42b77358cbb68335607e99794f729e4a558974a5" | ||
PROTON_COMMIT := "ae895e033f71df187c62d7cf9431a2e259ddd423" | ||
.PHONY: all build clean test | ||
|
||
all: build | ||
|
@@ -28,20 28,20 @@ test-plugins: | |
@echo " > Testing plugins with tag 'plugins'" | ||
go test $(if $(filter .,$(PLUGIN)),./plugins,$(if $(PLUGIN),./plugins/$(PLUGIN)/...,./plugins/...)) -tags=plugins -coverprofile=coverage-plugins$(subst .,root,$(subst /,-,$(if $(PLUGIN),-$(PLUGIN),))).out -parallel=1 | ||
|
||
test-coverage: # test test-plugins | ||
test-coverage: | ||
cp coverage.out coverage-all.out | ||
tail -n 2 coverage-plugins.out >> coverage-all.out | ||
go tool cover -html=coverage-all.out | ||
|
||
generate-proto: ## regenerate protos | ||
generate-proto: | ||
@echo " > cloning protobuf from raystack/proton" | ||
@echo " > generating protobuf" | ||
@buf generate --template buf.gen.yaml https://github.com/raystack/proton/archive/${PROTON_COMMIT}.zip#strip_components=1 --path raystack/assets/v1beta2 | ||
@echo " > protobuf compilation finished" | ||
|
||
lint: ## Lint with golangci-lint | ||
lint: | ||
golangci-lint run | ||
|
||
install: ## install required dependencies | ||
install: | ||
@echo "> installing dependencies" | ||
go install github.com/vektra/mockery/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 1,5 @@ | ||
version: v1 | ||
version: v2 | ||
plugins: | ||
- name: go | ||
- remote: buf.build/protocolbuffers/go:v1.31.0 | ||
out: models | ||
opt: paths=source_relative |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.