From 6b579e585c481453754a1ea3668c93fac167d9f2 Mon Sep 17 00:00:00 2001 From: Denis Mishankov Date: Thu, 23 Oct 2025 21:33:34 +0300 Subject: [PATCH 1/6] ci: add GitHub Actions workflow for linting and testing Add .github/workflows/ci.yml with golangci-lint job and a test matrix (ubuntu, windows, macos). Collects coverage (coverage.txt) and uploads reports to Codecov. --- .github/workflows/ci.yml | 48 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..fc79350 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,48 @@ +name: CI + +permissions: + contents: read + +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] + +jobs: + golangci: + name: lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + + - uses: actions/setup-go@v6 + with: + go-version: stable + + - name: golangci-lint + uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd + with: + version: v2.0 + + test: + runs-on: ${{ matrix.os }}-latest + strategy: + matrix: + os: [ubuntu, windows, macos] + steps: + - uses: actions/checkout@v5 + + - name: Set up Go + uses: actions/setup-go@v6 + with: + go-version: stable + + - name: Test + run: go test -v -coverprofile="coverage.txt" ./... + + - name: Upload coverage reports to Codecov + # upload coverage reports only once + uses: shogo82148/actions-goveralls@25f5320d970fb565100cf1993ada29be1bb196a1 + with: + path-to-profile: coverage.txt From 21308dd7039823f7acc5a5bd1f471c9d7a147cf2 Mon Sep 17 00:00:00 2001 From: Denis Mishankov Date: Thu, 23 Oct 2025 21:38:56 +0300 Subject: [PATCH 2/6] ci: update golangci-lint-action pin to newer commit --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fc79350..68a663a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: go-version: stable - name: golangci-lint - uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd + uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 with: version: v2.0 From a3babdb28e5cb40c7c720a7012aa42273ca80b2c Mon Sep 17 00:00:00 2001 From: Denis Mishankov Date: Thu, 23 Oct 2025 21:40:42 +0300 Subject: [PATCH 3/6] ci: bump golangci-lint action version to v2.5 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 68a663a..b3481c6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 with: - version: v2.0 + version: v2.5 test: runs-on: ${{ matrix.os }}-latest From 35850c72437ebd9da2bc6a635906f1c257ff51ce Mon Sep 17 00:00:00 2001 From: Denis Mishankov Date: Thu, 23 Oct 2025 21:51:20 +0300 Subject: [PATCH 4/6] docs: add README.md with project title and Coveralls coverage badge --- README.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..44e74e9 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# platforma + +[![Coverage Status](https://coveralls.io/repos/github/mishankov/platforma/badge.svg?branch=main)](https://coveralls.io/github/mishankov/platforma?branch=main) From 86da8e132cc11660e416fa03ad1acd8a5435582e Mon Sep 17 00:00:00 2001 From: Denis Mishankov Date: Thu, 23 Oct 2025 21:57:52 +0300 Subject: [PATCH 5/6] ci: add Dependabot config to auto-update Go modules and GitHub Actions monthly --- .github/dependabot.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..40e4822 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,20 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file + +version: 2 +updates: + - package-ecosystem: "gomod" + directory: "/" + schedule: + interval: "monthly" + groups: + default: + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" + groups: + default: From bb9c18ddc1b28161b5aa8de9a00d64c67c0ed98b Mon Sep 17 00:00:00 2001 From: Denis Mishankov Date: Thu, 23 Oct 2025 22:04:53 +0300 Subject: [PATCH 6/6] ci: include default patterns in .github/dependabot.yml for gomod and github-actions --- .github/dependabot.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 40e4822..43cd1b8 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -11,6 +11,8 @@ updates: interval: "monthly" groups: default: + patterns: + - "*" - package-ecosystem: "github-actions" directory: "/" @@ -18,3 +20,5 @@ updates: interval: "monthly" groups: default: + patterns: + - "*"