-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '1.x.x' into renovate/github.com-stretchr-testify-1.x
- Loading branch information
Showing
6 changed files
with
100 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
] | ||
} |