-
Notifications
You must be signed in to change notification settings - Fork 7
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
90 changed files
with
1,074 additions
and
812 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 |
---|---|---|
|
@@ -13,4 +13,4 @@ SENTRY_DSN= | |
SMTP_PASSWORD= | ||
SMTP_URL= | ||
SMTP_USERNAME= | ||
SMTP_PORT= | ||
SMTP_PORT= |
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,14 +1,12 @@ | ||
name: CI | ||
name: lint | ||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
ci: | ||
lint: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
@@ -29,3 +27,7 @@ jobs: | |
version: v1.54 | ||
working-directory: client | ||
args: --timeout=30m | ||
- run: go install golang.org/x/tools/cmd/goimports@latest | ||
- run: bash server/api/installBuf.bash | ||
- name: pre-commit | ||
uses: pre-commit/[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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,4 +25,4 @@ __debug_bin | |
.env.local | ||
|
||
apns_auth_key.p8 | ||
|
||
venv |
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,39 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.3.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-json | ||
exclude: vscode/launch.json | ||
- id: check-yaml | ||
exclude: deployment/.* | ||
- id: check-added-large-files | ||
- repo: https://github.com/dnephin/pre-commit-golang | ||
rev: v0.5.0 | ||
hooks: | ||
- id: go-fmt | ||
- id: go-imports | ||
- repo: local | ||
hooks: | ||
- id: regen-protobuf | ||
name: Regenerate protobuf files | ||
files: server/api/ | ||
entry: bash server/api/generate.bash | ||
language: system | ||
pass_filenames: false | ||
stages: [commit] | ||
- id: go-mod-tidy-server | ||
name: Check if go.mod and go.sum are up to date for server | ||
files: server/ | ||
entry: sh -c "(cd server && go mod tidy)" | ||
language: system | ||
pass_filenames: false | ||
stages: [commit] | ||
- id: go-mod-tidy-client | ||
name: Check if go.mod and go.sum are up to date for server | ||
files: server/ | ||
entry: sh -c "(cd client && go mod tidy)" | ||
language: system | ||
pass_filenames: false | ||
stages: [commit] |
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 |
---|---|---|
|
@@ -29,4 +29,4 @@ | |
"program": "${workspaceFolder}/client/publicServer/client.go", | ||
} | ||
] | ||
} | ||
} |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/bin/bash | ||
|
||
grpcurl -protoset <(buf build -o -) -plaintext -H "x-device-id:grpc-tests" api.tum.app:50052 api.Campus/GetNewsSources | ||
grpcurl -protoset <(buf build -o -) -plaintext -H "x-device-id:grpc-tests" api.tum.app:50052 api.Campus/GetNewsSources |
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 |
---|---|---|
|
@@ -21,4 +21,4 @@ spec: | |
target: | ||
type: Utilization | ||
averageUtilization: 75 | ||
{{ end }} | ||
{{ end }} |
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 |
---|---|---|
|
@@ -50,4 +50,4 @@ volumes: | |
campus-db-data: | ||
driver: local | ||
backend-storage: | ||
driver: local | ||
driver: local |
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,24 @@ | ||
#!/bin/bash | ||
|
||
# needs buf: https://docs.buf.build/installation#github-releases | ||
BASEDIR=$(dirname "$0") | ||
echo making sure that this script is run from $BASEDIR | ||
pushd $BASEDIR > /dev/null | ||
|
||
echo updating the generated files | ||
buf mod update || exit 1 | ||
buf generate || exit 1 | ||
|
||
echo making sure the openapi document points to the valid api | ||
grep -q '"basePath": "/v1"' ./tumdev/campus_backend.swagger.json || sed -i '1 a "basePath": "/v1",' ./tumdev/campus_backend.swagger.json | ||
|
||
echo making sure that all artifacts we don\'t need are cleaned up | ||
rm -f google/api/*.go | ||
rm -f google/api/*.swagger.json | ||
|
||
echo maing sure that the generated files are formatted | ||
go fmt tumdev/*.go | ||
goimports -w tumdev/*.go | ||
|
||
# clean up the stack | ||
popd > /dev/null |
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 |
---|---|---|
@@ -1,14 +1,26 @@ | ||
#!/bin/bash | ||
|
||
BASEDIR=$(dirname "$0") | ||
echo making sure that this script is run from $BASEDIR | ||
pushd $BASEDIR > /dev/null | ||
|
||
echo downloading... | ||
go get github.com/bufbuild/buf/cmd/buf \ | ||
github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway \ | ||
github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2 \ | ||
google.golang.org/protobuf/cmd/protoc-gen-go \ | ||
google.golang.org/grpc/cmd/protoc-gen-go-grpc | ||
|
||
echo installing... | ||
go install \ | ||
github.com/bufbuild/buf/cmd/buf \ | ||
github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway \ | ||
github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2 \ | ||
google.golang.org/protobuf/cmd/protoc-gen-go \ | ||
google.golang.org/grpc/cmd/protoc-gen-go-grpc | ||
|
||
go mod tidy | ||
|
||
echo tidiing up | ||
go mod tidy | ||
|
||
popd |
Oops, something went wrong.