mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-12-26 16:09:45 -05:00
3cc2a714a4
Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
53 lines
1.3 KiB
YAML
53 lines
1.3 KiB
YAML
name: Go generate check
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- main
|
|
- "release/**"
|
|
pull_request:
|
|
|
|
jobs:
|
|
go-generate:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0
|
|
with:
|
|
path: constellation
|
|
ref: ${{ github.head_ref }}
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@d0a58c1c4d2b25278816e339b944508c875f3613 # v3.4.0
|
|
with:
|
|
go-version: "1.19.4"
|
|
cache: true
|
|
cache-dependency-path: constellation/go.mod
|
|
|
|
- name: Install docgen
|
|
uses: ./constellation/.github/actions/install_docgen
|
|
|
|
- name: Install stringer
|
|
shell: bash
|
|
run: go install golang.org/x/tools/cmd/stringer@latest
|
|
|
|
- name: Get Go submodules
|
|
id: submods
|
|
shell: bash
|
|
working-directory: constellation
|
|
run: |
|
|
mods=$(go list -f '{{.Dir}}' -m | xargs)
|
|
echo "Found mods: $mods"
|
|
echo "submods=${mods}" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Go generate check
|
|
shell: bash
|
|
working-directory: constellation
|
|
run: |
|
|
mods="${{ steps.submods.outputs.submods }}"
|
|
for mod in $mods; do
|
|
go generate $mod/...
|
|
done
|
|
git diff --exit-code
|