-
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 pull request #53 from go-park-mail-ru/develop
rk4
- Loading branch information
Showing
3,057 changed files
with
6,749 additions
and
1,041,227 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
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,100 @@ | ||
name: BogoSort_2024_2 Deploy | ||
|
||
on: | ||
push: | ||
branches: [main, develop, 'TP-*'] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
run-linters: | ||
name: run-linters | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 20 | ||
steps: | ||
- name: Check out code into directory | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Go 1.x | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.23 | ||
id: go | ||
|
||
- name: Cache Go modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: /path/to/your/cache | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.mod') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Install required dependencies | ||
run: go mod tidy | ||
|
||
- name: Run linter | ||
uses: golangci/golangci-lint-action@v6 | ||
with: | ||
version: latest | ||
working-directory: . | ||
args: -c ./.golangci.yaml | ||
|
||
run-tests: | ||
name: run-tests | ||
needs: run-linters | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 20 | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.23' | ||
|
||
- name: Cache Go modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: /path/to/your/cache | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.mod') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Get Dependencies | ||
run: go get ./... | ||
|
||
- name: Build Application | ||
run: go build ./... | ||
|
||
- name: Run Tests | ||
run: | | ||
go test -json ./... -coverprofile coverprofile_.tmp -coverpkg=./... ; \ | ||
grep -v -e '/mocks' -e 'mock_repository.go' -e 'mock.go' -e 'docs.go' -e '_easyjson.go' -e '.pb.go' -e 'gen.go' -e '/cmd/' -e '/config/' -e '/pkg/connector/' coverprofile_.tmp > coverprofile.tmp ; \ | ||
rm coverprofile_.tmp ; \ | ||
go tool cover -html coverprofile.tmp -o ../heatmap.html; \ | ||
go tool cover -func coverprofile.tmp | ||
deploy: | ||
name: deploy to server | ||
if: github.ref == 'refs/heads/main' | ||
needs: [run-linters, run-tests] | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 20 | ||
steps: | ||
- name: Deploy to Server | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.HOST }} | ||
username: ${{ secrets.USERNAME }} | ||
key: ${{ secrets.PRIVATE_KEY }} | ||
debug: true | ||
script: | | ||
cd /home/${{ secrets.USERNAME }}/2024_2_BogoSort | ||
git checkout develop | ||
git fetch && git pull | ||
sudo docker-compose build | ||
sudo docker-compose down | ||
sudo docker-compose up -d --build --remove-orphans |
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,13 @@ go.work.sum | |
|
||
.DS_Store | ||
|
||
dump.rdb | ||
app | ||
|
||
.idea/ | ||
|
||
.vscode/ | ||
|
||
# SSL certificates | ||
db/certs/*.crt | ||
db/certs/*.key |
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,114 +1,20 @@ | ||
linters: | ||
enable: | ||
- asasalint | ||
- asciicheck | ||
- bidichk | ||
- bodyclose | ||
- containedctx | ||
- contextcheck | ||
- cyclop | ||
- decorder | ||
- dogsled | ||
- dupl | ||
- dupword | ||
- durationcheck | ||
- errcheck | ||
- errchkjson | ||
- errname | ||
- errorlint | ||
- execinquery | ||
- exhaustive | ||
- exportloopref | ||
- forcetypeassert | ||
- ginkgolinter | ||
- gocheckcompilerdirectives | ||
- gochecknoinits | ||
- gocognit | ||
- goconst | ||
- gocritic | ||
- gocyclo | ||
- godox | ||
- goerr113 | ||
- goheader | ||
- gomnd | ||
- gomoddirectives | ||
- gomodguard | ||
- goprintffuncname | ||
- gosimple | ||
- gosmopolitan | ||
- govet | ||
- grouper | ||
- importas | ||
- ineffassign | ||
- interfacebloat | ||
- ireturn | ||
- lll | ||
- loggercheck | ||
- maintidx | ||
- makezero | ||
- mirror | ||
- misspell | ||
- musttag | ||
- nakedret | ||
- nestif | ||
- nilerr | ||
- nilnil | ||
- nlreturn | ||
- nolintlint | ||
- nonamedreturns | ||
- nosprintfhostport | ||
- prealloc | ||
- predeclared | ||
- promlinter | ||
- reassign | ||
- revive | ||
- rowserrcheck | ||
- sqlclosecheck | ||
- staticcheck | ||
- stylecheck | ||
- tenv | ||
- testableexamples | ||
- thelper | ||
- tparallel | ||
- typecheck | ||
- unconvert | ||
- unparam | ||
- unused | ||
- usestdlibvars | ||
- wastedassign | ||
- whitespace | ||
- wsl | ||
- zerologlint | ||
|
||
disable: | ||
- varcheck | ||
- exhaustivestruct | ||
- exhaustruct | ||
- maligned | ||
- scopelint | ||
- interfacer | ||
- structcheck | ||
- nosnakecase | ||
- golint | ||
- deadcode | ||
- ifshort | ||
- depguard | ||
- wrapcheck | ||
- varnamelen | ||
- testpackage | ||
- tagliatelle | ||
- noctx | ||
- gochecknoglobals | ||
- gofmt | ||
- gci | ||
- paralleltest | ||
- gocyclo | ||
- goconst | ||
- gofumpt | ||
- gosec | ||
- goimports | ||
- funlen | ||
|
||
|
||
- misspell | ||
|
||
linters-settings: | ||
cyclop: | ||
max-complexity: 12 | ||
run: | ||
build-tags: | ||
- wireinject | ||
tests: false | ||
timeout: 5m |
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
Oops, something went wrong.