-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/feat-minio-storage' into develop
- Loading branch information
Showing
82 changed files
with
5,860 additions
and
585 deletions.
There are no files selected for viewing
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,18 @@ | ||
# Increase or decrease based on the available host memory (in bytes) | ||
|
||
MEM_LIMIT=8073741824 | ||
|
||
|
||
MYSQL_PASSWORD=qwe123 | ||
MYSQL_PORT=3306 | ||
|
||
# Port to expose minio to the host | ||
MINIO_CONSOLE_PORT=9001 | ||
MINIO_PORT=9000 | ||
|
||
MINIO_USER=begonia | ||
MINIO_PASSWORD=begoniabegonia | ||
|
||
|
||
TIMEZONE='Asia/Shanghai' | ||
|
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 |
---|---|---|
|
@@ -3,10 +3,14 @@ name: Go | |
on: | ||
push: | ||
paths: | ||
- '**.go' | ||
- "**.go" | ||
- "**.yml" | ||
- "**.mod" | ||
pull_request: | ||
paths: | ||
- '**.go' | ||
- "**.go" | ||
- "**.yml" | ||
- "**.mod" | ||
|
||
jobs: | ||
test: | ||
|
@@ -17,16 +21,44 @@ jobs: | |
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.20.7 | ||
go-version: 1.22.4 | ||
|
||
- name: Start Docker Composer | ||
run: docker-compose up -d | ||
|
||
- name: Init MySQL | ||
run: | | ||
go run ./cmd/begonia init -e dev | ||
cat ~/.begonia/admin-app.json | ||
go mod tidy | ||
go run ./cmd/begonia init -c ./config/settings.yml -e test | ||
cat ~/.begonia/admin-app.test.json | ||
- name: Init Minio | ||
run: | | ||
go install github.com/minio/mc@latest | ||
cat << EOF > /tmp/policy.json | ||
{ | ||
"Version": "2012-10-17", | ||
"Statement": [ | ||
{ | ||
"Effect": "Allow", | ||
"Action": [ | ||
"s3:*" | ||
], | ||
"Resource": [ | ||
"arn:aws:s3:::*" | ||
] | ||
} | ||
] | ||
} | ||
EOF | ||
- name: Configure Minio | ||
run: | | ||
mc alias set myminio http://127.0.0.1:9000 begonia begoniabegonia | ||
mc admin user add myminio begonia-2 begoniabegonia | ||
mc admin user svcacct add \ | ||
--access-key "begonia" \ | ||
--secret-key "begoniabegonia" \ | ||
--policy "/tmp/policy.json" \ | ||
myminio begonia-2 | ||
- name: Type a temporary tag | ||
run: git tag test-$(date '+%Y%m%d%H%M%S') | ||
|
||
|
@@ -45,7 +77,7 @@ jobs: | |
cd grpc-gateway | ||
go install ./protoc-gen-grpc-gateway | ||
- name: Test | ||
run: go test -v -gcflags=-l -coverprofile=coverage.txt -covermode=atomic -ldflags -X=github.com/begonia-org/begonia.Version=$(git describe --tags --abbrev=0)\ -X=github.com/begonia-org/begonia.BuildTime=$(date '+%Y%m%d%H%M%S')\ -X=github.com/begonia-org/begonia.Commit=$(git rev-parse --short HEAD)\ -X=github.com/begonia-org/begonia.Env=test ./... | ||
run: go test -p 1 -v -gcflags=-l -coverprofile=coverage.txt -covermode=atomic -ldflags -X=github.com/begonia-org/begonia.Version=$(git describe --tags --abbrev=0)\ -X=github.com/begonia-org/begonia.BuildTime=$(date '+%Y%m%d%H%M%S')\ -X=github.com/begonia-org/begonia.Commit=$(git rev-parse --short HEAD)\ -X=github.com/begonia-org/begonia.Env=test ./... | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/[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
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
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
ignore: | ||
- "cmd" | ||
- "version.go" | ||
- "example" | ||
- "config" |
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.