unpack payload in yield parser #17
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 CI | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- go/** | |
pull_request: | |
branches: | |
- main | |
paths: | |
- go/** | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: go | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go/go.mod' | |
cache: true | |
- name: Display Go version | |
run: go version | |
- name: Pull in all Go dependencies | |
run: go mod vendor | |
- name: Run golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: latest | |
working-directory: ./go | |
skip-pkg-cache: true | |
skip-build-cache: true | |
- name: Check code formatting via go fmt | |
run: | | |
if [ "$(gofmt -s -l . | grep -v vendor | wc -l)" -gt 0 ]; then | |
echo "Code is not formatted. Please run 'go fmt'." | |
exit 1 | |
fi | |
- name: Check that go modules are in sync | |
run: | | |
go mod tidy -v | |
if [ -n "$(git status --porcelain go.mod go.sum)" ]; then | |
echo "Go modules are not in sync. Please run 'go mod tidy'." | |
exit 1 | |
fi | |
- name: Run unit tests | |
run: make test |