-
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.
- Loading branch information
Showing
256 changed files
with
30,881 additions
and
4,006 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,63 @@ | ||
name: SparkIt build | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- final | ||
|
||
jobs: | ||
linters-act: | ||
name: linters | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.21' | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v4 | ||
tests-act: | ||
name: tests | ||
needs: linters-act | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.21' | ||
- name: ImageData | ||
run: cd /home/runner && mkdir imagedata | ||
- name: Build | ||
run: go build -v ./... | ||
- name: Test | ||
run: go test -v ./... | ||
|
||
deploy: | ||
name: Deploy SparkIt | ||
needs: tests-act | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Pull Code | ||
uses: appleboy/ssh-action@master | ||
with: | ||
host: ${{ secrets.HOST }} | ||
username: ${{ secrets.USERNAME}} | ||
key: ${{ secrets.PRIVATE_KEY }} | ||
script: cd /home/ubuntu/2024_2_SaraFun/ && git pull | ||
- name: Build containers | ||
uses: appleboy/ssh-action@master | ||
with: | ||
timeout: 10m | ||
host: ${{ secrets.HOST }} | ||
username: ubuntu | ||
key: ${{ secrets.PRIVATE_KEY }} | ||
script: cd /home/ubuntu/2024_2_SaraFun/ && make sparkit-run | ||
- name: Restart service | ||
uses: appleboy/ssh-action@master | ||
with: | ||
host: ${{ secrets.HOST }} | ||
username: ubuntu | ||
key: ${{ secrets.PRIVATE_KEY }} | ||
script: cd /home/ubuntu/2024_2_SaraFun/ && make sparkit-down && make sparkit-run | ||
|
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 +1,7 @@ | ||
.idea/ | ||
.idea/ | ||
server.crt | ||
server.key | ||
coverage.out | ||
coverprofile.tmp | ||
.env | ||
docker/.env |
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,15 @@ | ||
linters-settings: | ||
gocognit: | ||
min-complexity: 60 | ||
|
||
linters: | ||
disable-all: true | ||
enable: | ||
- govet | ||
- gosimple | ||
- bodyclose | ||
- noctx | ||
- errcheck | ||
- gocognit | ||
- goconst | ||
- gofmt |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
listen_addresses = 'sparkit-postgres' | ||
max_connections = 100 | ||
statement_timeout = '30s' | ||
lock_timeout = '5s' | ||
log_destination = 'csvlog' | ||
logging_collector = on | ||
log_directory = 'pg_log' | ||
log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' | ||
log_min_duration_statement = 1000 | ||
log_statement = 'none' | ||
log_line_prefix = '%m [%p]: [%l-1] user=%u,db=%d,client=%h ' | ||
log_error_verbosity = default | ||
log_min_error_statement = error | ||
shared_preload_libraries = 'pg_stat_statements, auto_explain' | ||
pg_stat_statements.max = 10000 | ||
pg_stat_statements.track = all | ||
pg_stat_statements.track_utility = on | ||
auto_explain.log_min_duration = '1000ms' | ||
auto_explain.log_analyze = on | ||
auto_explain.log_buffers = on | ||
auto_explain.log_timing = on | ||
auto_explain.log_triggers = on |
Oops, something went wrong.