diff --git a/.editorconfig b/.editorconfig index dd69de0..f8c94d9 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,15 +1,13 @@ -# EditorConfig is awesome: https://EditorConfig.org - -# top-most EditorConfig file +# Editor configuration, see http://editorconfig.org root = true [*] -indent_style = space -indent_size = 2 -end_of_line = lf charset = utf-8 -trim_trailing_whitespace = true +end_of_line = lf +indent_size = 2 +indent_style = space insert_final_newline = false +trim_trailing_whitespace = true -[Makefile] -indent_style = tab \ No newline at end of file +[{Makefile,*.go}] +indent_style = tab diff --git a/.gitea/workflows/golangci-lint.yaml b/.gitea/workflows/golang-linters.yaml similarity index 74% rename from .gitea/workflows/golangci-lint.yaml rename to .gitea/workflows/golang-linters.yaml index 697b438..af61dec 100644 --- a/.gitea/workflows/golangci-lint.yaml +++ b/.gitea/workflows/golang-linters.yaml @@ -1,4 +1,4 @@ -name: Golang CI lint +name: "Lint Golang files" on: pull_request: @@ -6,12 +6,14 @@ on: push: branches: [ '**' ] tags-ignore: [ '**' ] + workflow_dispatch: {} permissions: contents: read jobs: golangci: + name: "Run golang CI linter" runs-on: ${{ matrix.os }} strategy: matrix: @@ -24,4 +26,4 @@ jobs: go-version: ${{ matrix.go }} - uses: golangci/golangci-lint-action@v8.0.0 with: - version: v2.1 \ No newline at end of file + version: v2.3.0 # renovate: datasource=github-releases depName=golangci/golangci-lint diff --git a/.gitea/workflows/golang-tests.yaml b/.gitea/workflows/golang-tests.yaml index f6b4241..a689b4a 100644 --- a/.gitea/workflows/golang-tests.yaml +++ b/.gitea/workflows/golang-tests.yaml @@ -1,4 +1,4 @@ -name: Golang Tests +name: "Run Golang tests" on: pull_request: @@ -6,9 +6,27 @@ on: push: branches: [ '**' ] tags-ignore: [ '**' ] + workflow_dispatch: {} jobs: - unittest: + # integration-test: + # name: "Run integration tests" + # runs-on: ${{ matrix.os }} + # strategy: + # matrix: + # go: [ stable ] + # os: [ ubuntu-latest-amd64, ubuntu-latest-arm64 ] + # steps: + # - uses: actions/checkout@v4.3.0 + # - uses: actions/setup-go@v5.5.0 + # with: + # go-version: ${{ matrix.go }} + # - env: + # GOPROXY: ${{ vars.GOPROXY }} + # run: make test/integration + + unit-test: + name: "Run unit tests" runs-on: ${{ matrix.os }} strategy: matrix: diff --git a/.gitea/workflows/markdown-linters.yaml b/.gitea/workflows/markdown-linters.yaml index d7b670c..7ce9fce 100644 --- a/.gitea/workflows/markdown-linters.yaml +++ b/.gitea/workflows/markdown-linters.yaml @@ -1,4 +1,4 @@ -name: 'Lint Markdown files' +name: "Lint Markdown files" on: pull_request: @@ -6,13 +6,14 @@ on: push: branches: [ '*' ] tags-ignore: [ '*' ] + workflow_dispatch: {} jobs: markdown-lint: - runs-on: - - ubuntu-latest + name: "Run markdown linter" + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4.3.0 - uses: DavidAnson/markdownlint-cli2-action@v20.0.0 with: - globs: '**/*.md' \ No newline at end of file + globs: '**/*.md' diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index db6a80b..43d3836 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -1,4 +1,4 @@ -name: Release +name: "Release" on: push: @@ -9,8 +9,8 @@ permissions: jobs: release: - runs-on: - - ubuntu-latest + name: "Release application" + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4.3.0 - uses: docker/setup-qemu-action@v3.6.0 @@ -28,7 +28,7 @@ jobs: GOPROXY: ${{ vars.GOPROXY }} uses: goreleaser/goreleaser-action@v6.3.0 with: - version: "~> v2" + version: v2.11.2 # renovate: datasource=github-releases depName=goreleaser/goreleaser args: release --clean sync-to-hub-docker-io: diff --git a/.gitea/workflows/update-docker-hub-description.yaml b/.gitea/workflows/update-docker-hub-description.yaml index 906f31c..6d628c0 100644 --- a/.gitea/workflows/update-docker-hub-description.yaml +++ b/.gitea/workflows/update-docker-hub-description.yaml @@ -8,8 +8,7 @@ on: jobs: update-description-on-hub-docker-io: - runs-on: - - ubuntu-latest + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4.3.0 - uses: peter-evans/dockerhub-description@v4.0.2 @@ -17,4 +16,4 @@ jobs: username: ${{ secrets.DOCKER_IO_USERNAME }} password: ${{ secrets.DOCKER_IO_PASSWORD }} repository: volkerraschek/civ - readme-filepath: README.md \ No newline at end of file + readme-filepath: README.md diff --git a/.golangci.yaml b/.golangci.yaml new file mode 100644 index 0000000..9e02d10 --- /dev/null +++ b/.golangci.yaml @@ -0,0 +1,13 @@ +version: "2" +linters: + default: standard + enable: + - errname + - gosec + + exclusions: + rules: [] + warn-unused: true + +run: + tests: true