fix(yamlmerger): Update RecursiveMerge
to support ScalarNode
kind
#3688
Workflow file for this run
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
name: Go static checks | |
on: | |
push: | |
branches: [stable] | |
pull_request: | |
types: [opened, synchronize, reopened] | |
branches: [staging] | |
paths: | |
- '**' | |
- '!.github/**' | |
- '.github/workflows/gochecks.yaml' | |
jobs: | |
gochecks: | |
runs-on: ubuntu-latest | |
name: All | |
env: | |
RUNGOGENERATE: false | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: 1.21.2 | |
cache: false | |
- name: Set Go variables | |
id: goenv | |
run: | | |
{ | |
echo "cache=$(go env GOCACHE)" | |
echo "modcache=$(go env GOMODCACHE)" | |
echo "mod=$(go env GOMOD)" | |
} >>"$GITHUB_OUTPUT" | |
- name: Go caches | |
uses: actions/cache@v4 | |
with: | |
path: | | |
${{ steps.goenv.outputs.cache }} | |
${{ steps.goenv.outputs.modcache }} | |
key: ${{ github.job }}-${{ runner.os }}-go-${{ hashFiles(steps.goenv.outputs.mod) }} | |
restore-keys: | | |
${{ github.job }}-${{ runner.os }}-go- | |
- name: Check that go.mod is tidy | |
uses: protocol/[email protected] | |
with: | |
run: | | |
git config --global --add safe.directory '*' | |
go mod tidy | |
if [[ -n $(git ls-files --other --exclude-standard --directory -- go.sum) ]]; then | |
echo "go.sum was added by go mod tidy" | |
exit 1 | |
fi | |
git diff --exit-code -- go.sum go.mod | |
- name: gofumpt | |
if: success() || failure() # run this step even if the previous one failed | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: v1.55.1 | |
args: --timeout=30m --no-config --disable-all --enable=gofumpt --out-format=colored-line-number | |
skip-cache: true | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: v1.55.1 | |
args: --timeout=30m --out-format=colored-line-number | |
skip-cache: true | |
- name: go generate | |
uses: protocol/[email protected] | |
if: (success() || failure()) && env.RUNGOGENERATE == 'true' | |
with: | |
run: | | |
git clean -fd # make sure there aren't untracked files / directories | |
go generate ./... | |
# check if go generate modified or added any files | |
if ! $(git add . && git diff-index HEAD --exit-code --quiet); then | |
echo "go generate caused changes to the repository:" | |
git status --short | |
exit 1 | |
fi |