Skip to content

Commit

Permalink
ci: check metrics generation in CI checks (backport #2483) (#2485)
Browse files Browse the repository at this point in the history
This is an automatic backport of pull request #2483 done by
[Mergify](https://mergify.com).


---


<details>
<summary>Mergify commands and options</summary>

<br />

More conditions and actions can be found in the
[documentation](https://docs.mergify.com/).

You can also trigger Mergify actions by commenting on this pull request:

- `@Mergifyio refresh` will re-evaluate the rules
- `@Mergifyio rebase` will rebase this PR on its base branch
- `@Mergifyio update` will merge the base branch into this PR
- `@Mergifyio backport <destination>` will backport this PR on
`<destination>` branch

Additionally, on Mergify [dashboard](https://dashboard.mergify.com) you
can:

- look at your merge queues
- generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com
</details>

Co-authored-by: Sergio Mena <sergio@informal.systems>
  • Loading branch information
mergify[bot] and sergio-mena committed Feb 29, 2024
1 parent 91413e6 commit 99c1816
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/check-generated.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ permissions:
contents: read

jobs:
check-mocks:
check-mocks-metrics:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v5
Expand All @@ -22,17 +22,18 @@ jobs:

- uses: actions/checkout@v4

- name: "Check generated mocks"
- name: "Check generated mocks and metrics"
run: |
set -euo pipefail
make mockery
make mockery metrics
if ! git diff --stat --exit-code ; then
git add .
if ! git diff HEAD --stat --exit-code ; then
echo ">> ERROR:"
echo ">>"
echo ">> Generated mocks require update (either Mockery or source files may have changed)."
echo ">> Ensure your tools are up-to-date, re-run 'make mockery' and update this PR."
echo ">> Generated mocks and/or metrics require update (either Mockery or source files may have changed)."
echo ">> Ensure your tools are up-to-date, re-run 'make mockery metrics' and update this PR."
echo ">>"
git diff
exit 1
Expand All @@ -55,7 +56,8 @@ jobs:
make proto-gen
if ! git diff --stat --exit-code ; then
git add .
if ! git diff HEAD --stat --exit-code ; then
echo ">> ERROR:"
echo ">>"
echo ">> Protobuf generated code requires update (either tools or .proto files may have changed)."
Expand Down

0 comments on commit 99c1816

Please sign in to comment.