Skip to content

Commit

Permalink
Merge branch '1.x.x' into renovate/github.com-stretchr-testify-1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminNolan committed Apr 11, 2024
2 parents c36f076 + bbaeae9 commit 38e0caa
Show file tree
Hide file tree
Showing 6 changed files with 100 additions and 39 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/code_coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# **Note:** Please ignore `sonarlint(secrets:S6698)` until they add a way to
# suppress it for specific lines or files without having to disable the rule
# entirely.

name: Code Coverage
on:
push:
branches:
- 1.x.x
pull_request:
types: [opened, synchronize, reopened]
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
coverage:
name: Compute code coverage and send it to SonarCloud
runs-on: ubuntu-latest
container: docker://golang:1.22.0

steps:
- name: Checkout ui-backend
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_ACTION_CHECKOUT_TOKEN }}

- name: Run tests and compute code coverage
run: |
set -e
go clean -testcache
GOEXPERIMENT=nocoverageredesign go test -v -coverpkg=./... -coverprofile=.coverage.out ./...
go tool cover -func=.coverage.out
go tool cover -html=.coverage.out -o .coverage.html
- name: Upload coverage.html artifact
uses: actions/upload-artifact@v4
with:
name: coverage.html
path: .coverage.html

- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@v2.1.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

merge-renovate-prs:
name: Auto-merge Renovate PRs if tests pass
needs: [coverage]
if: needs.coverage.result == 'success' && startsWith(github.head_ref , 'renovate/')
runs-on: ubuntu-latest
steps:
- name: Merge PR
uses: squalrus/merge-bot@v0.4.5
with:
# Set to true to test the action without merging
test: false
GITHUB_TOKEN: ${{ secrets.GH_ACTION_MERGE_RENOVATE_TOKEN }}
reviewers: false
labels: renovate
method: squash
delete_source_branch: true
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# syntax=docker/dockerfile:1.6
# syntax=docker/dockerfile:1.7
FROM golang:1.22-bullseye AS builder
# RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
# go install -ldflags "-s -w" -trimpath github.com/omnipeak/protoc-gen-markdown@v0.0.1
Expand Down
6 changes: 4 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ module github.com/omnipeak/protoc-gen-markdown
go 1.22.0

require (
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.32.0-20240212200630-3014d81c3a48.1
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.33.0-20240221180331-f05a6f4403ce.1
github.com/pkg/errors v0.9.1
github.com/stretchr/testify v1.9.0
github.com/pkg/errors v0.9.1
github.com/stretchr/testify v1.8.4
golang.org/x/text v0.14.0
google.golang.org/protobuf v1.32.0
google.golang.org/protobuf v1.33.0
)

require (
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.32.0-2023111520450
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.32.0-20231115204500-e097f827e652.1/go.mod h1:tiTMKD8j6Pd/D2WzREoweufjzaJKHZg35f/VGcZ2v3I=
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.32.0-20240212200630-3014d81c3a48.1 h1:rOe/itdO7+9cWOnKqvpn1K7VmTDwp3vI4juPz6aNQbc=
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.32.0-20240212200630-3014d81c3a48.1/go.mod h1:tiTMKD8j6Pd/D2WzREoweufjzaJKHZg35f/VGcZ2v3I=
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.33.0-20240221180331-f05a6f4403ce.1 h1:0nWhrRcnkgw1kwJ7xibIO8bqfOA7pBzBjGCDBxIHch8=
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.33.0-20240221180331-f05a6f4403ce.1/go.mod h1:Tgn5bgL220vkFOI0KPStlcClPeOJzAv4uT+V8JXGUnw=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
Expand All @@ -28,6 +30,8 @@ google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I=
google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
42 changes: 21 additions & 21 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 5 additions & 15 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended"
],
"customManagers": [
{
"customType": "regex",
"fileMatch": [
"^.pre-commit-config.ya?ml$"
],
"matchStrings": [
" rev: [\"']?(?<currentValue>v\\d+(?:\\.\\d+)*)[\"']? # (?<datasource>[\\w-]+) (?<depName>[\\w\\.\\/-]+)"
]
}
],
"schedule": ["after 1am and before 9am every weekday", "every weekend"],
"timezone": "Europe/Berlin"
"github>omnipeak/infrastructure//renovate/base",
"github>omnipeak/infrastructure//renovate/pre-commit-config",
"github>omnipeak/infrastructure//renovate/github-workflows-config",
"github>omnipeak/infrastructure//renovate/sonarcloud"
]
}

0 comments on commit 38e0caa

Please sign in to comment.