From ad154ff218120e4b6626794a7b7aae13cde5d790 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Sch=C3=A4fer?= Date: Sun, 7 Jun 2026 17:28:17 +0200 Subject: [PATCH] chore(dependabot): group dependency updates into single PRs per ecosystem and add github ci action MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marc Schäfer --- .github/dependabot.yml | 16 +++++++ .github/workflows/ci.yml | 91 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 107 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 3938344..4f8502e 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,6 +1,22 @@ version: 2 + updates: - package-ecosystem: "gomod" directory: "/" schedule: interval: "daily" + open-pull-requests-limit: 1 + groups: + go-dependencies: + patterns: + - "*" + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + open-pull-requests-limit: 1 + groups: + github-actions-dependencies: + patterns: + - "*" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..815ca69 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,91 @@ +name: CI + +on: + push: + branches: + - main + pull_request: + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +env: + GOLANGCI_LINT_VERSION: "v2.12.2" + YAEGI_VERSION: "v0.16.1" + GOPATH: ${{ github.workspace }}/go + REPOPATH: ${{ github.workspace }}/go/src/github.com/fosrl/badger + +jobs: + ci: + name: Go CI + runs-on: ubuntu-latest + + defaults: + run: + working-directory: ${{ env.REPOPATH }} + + steps: + - name: Check out code + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + with: + path: go/src/github.com/fosrl/badger + persist-credentials: false + fetch-depth: 2 + + - name: Set up Go + uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 + with: + go-version-file: go/src/github.com/fosrl/badger/.go-version + + - name: Show Go version + run: go version + + - name: Run CI checks + run: make ci + + - name: Run golangci-lint + uses: golangci/golangci-lint-action@82606bf257cbaff209d206a39f5134f0cfbfd2ee # v9.2.1 + continue-on-error: true + with: + version: ${{ env.GOLANGCI_LINT_VERSION }} + working-directory: ${{ env.REPOPATH }} + + - name: Validate Traefik plugin metadata + run: | + test -f .traefik.yml + grep -q '^displayName:' .traefik.yml + grep -q '^type:' .traefik.yml + grep -q '^import:' .traefik.yml + grep -q '^testData:' .traefik.yml + grep -q 'github.com/fosrl/badger' .traefik.yml + + yaegi: + name: Yaegi compatibility + runs-on: ubuntu-latest + + defaults: + run: + working-directory: ${{ env.REPOPATH }} + + steps: + - name: Check out code + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + with: + path: go/src/github.com/fosrl/badger + persist-credentials: false + fetch-depth: 2 + + - name: Set up Go + uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 + with: + go-version-file: go/src/github.com/fosrl/badger/.go-version + + - name: Run Yaegi compatibility test + env: + GOPATH: ${{ env.GOPATH }} + run: make yaegi-test