-
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.
- Loading branch information
Showing
10 changed files
with
56 additions
and
140 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,18 +9,17 @@ 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 | ||
run: make test | ||
- name: Upload coverage artifact | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: coverage | ||
path: coverage.out | ||
|
@@ -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,33 +47,31 @@ 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 | ||
run: make test-plugins PLUGIN=${{ matrix.plugins }} | ||
- name: Upload coverage artifact | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: coverage-plugins | ||
path: coverage-plugins*.out | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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] |