Skip to content

Fix linter issues and simplify yaml files #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
---
# See https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "gomod"
directory: "/"
- package-ecosystem: gomod
directory: /
schedule:
interval: "weekly"
interval: weekly

- package-ecosystem: "github-actions"
directory: "/"
- package-ecosystem: github-actions
directory: /
schedule:
interval: "weekly"
interval: weekly
12 changes: 6 additions & 6 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
name: Go

on:
push:
pull_request:
branches: ["main"]
branches: [main]
workflow_dispatch:

jobs:
test:
name: test
Expand All @@ -16,7 +16,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22.0'
go-version: 1.22.0

- name: Check that all packages are compiling
run: make build
Expand Down Expand Up @@ -49,12 +49,12 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22.0'
go-version: 1.22.0

- name: Check actuality of go.mod and go.sum
run: |
go mod tidy
git diff --exit-code && exit 0 || true
git diff --exit-code && exit 0 || true
echo '######################################################################'
echo
echo "ERROR: go.mod or go.sum is different from the committed version"
Expand All @@ -71,7 +71,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22.0'
go-version: 1.22.0
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
Expand Down
21 changes: 11 additions & 10 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
image: golang:1.22

stages:
Expand Down Expand Up @@ -47,7 +48,7 @@ test:
coverage_report:
coverage_format: cobertura
path: coverage.xml
coverage: '/^total:\s+\(statements\)\s+(\d+(?:\.\d+)?%)/'
coverage: /^total:\s+\(statements\)\s+(\d+(?:\.\d+)?%)/
only:
- branches

Expand All @@ -59,13 +60,13 @@ check-go-modules:
script:
- go mod tidy
- |
git diff --exit-code && exit 0 || true
echo -e "\033[0;31m"
echo '######################################################################'
echo
echo "ERROR: go.mod or go.sum is different from the committed version"
echo "Try using 'go mod tidy' to fix the go.mod and go.sum files"
echo "Also, don't forget to commit and push changes"
echo
echo '######################################################################'
git diff --exit-code && exit 0 || true
echo -e "\033[0;31m"
echo '######################################################################'
echo
echo "ERROR: go.mod or go.sum is different from the committed version"
echo "Try using 'go mod tidy' to fix the go.mod and go.sum files"
echo "Also, don't forget to commit and push changes"
echo
echo '######################################################################'
exit 1
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
linters:
disable-all: true
enable:
Expand Down
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
version: "3.8"

services:
Expand All @@ -15,7 +16,7 @@ services:
retries: 5
timeout: 5s
ports:
- "32260:5432"
- 32260:5432
volumes:
- ./docker-multiple-databases.sh:/docker-entrypoint-initdb.d/docker-multiple-databases.sh:ro
tmpfs:
Expand Down