-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate avro to GitHub actions (#122)
- Loading branch information
1 parent
38654de
commit 6c34fe4
Showing
15 changed files
with
133 additions
and
136 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,79 @@ | ||
name: avro | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
paths: | ||
- '**.go' | ||
- 'go.*' | ||
- '**.cue' | ||
- Makefile | ||
pull_request: | ||
paths: | ||
- '**.go' | ||
- 'go.*' | ||
- '**.cue' | ||
- Makefile | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
directory: "." | ||
allow_lint_failure: "true" | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-22.04 | ||
services: | ||
registry: | ||
image: lensesio/fast-data-dev:2.6.2-L0 | ||
ports: | ||
- 8081:8081 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Set up env | ||
uses: actions/setup-go@v3 | ||
with: | ||
cache: true | ||
check-latest: true | ||
cache-dependency-path: ${{ env.directory }}/go.sum | ||
go-version-file: ${{ env.directory }}/go.mod | ||
- name: Install Tools | ||
shell: bash | ||
run: | | ||
go install github.com/mfridman/[email protected] | ||
tgz=$(mktemp) | ||
ARCH="$(uname -s)_$(uname -m)" | ||
curl "https://github.com/cuelang/cue/releases/download/v0.0.15/cue_0.0.15_$ARCH.tar.gz" -L -o $tgz | ||
(cd /usr/local/bin && tar xzf $tgz cue) | ||
- name: "Lint: static" | ||
id: lint-static | ||
continue-on-error: false | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: v1.52.2 | ||
working-directory: ${{ env.directory }} | ||
args: --timeout=5m | ||
skip-cache: true | ||
- name: "Lint: security" | ||
id: lint-security | ||
continue-on-error: true | ||
working-directory: ${{ env.directory }} | ||
run: | | ||
go install golang.org/x/vuln/cmd/govulncheck@latest | ||
govulncheck ./... | ||
- name: Build | ||
run: | | ||
make build | ||
- name: Unit tests | ||
working-directory: ${{ env.directory }} | ||
env: | ||
CGO_ENABLED: "1" | ||
KAFKA_REGISTRY_ADDR: 127.0.0.1:8081 | ||
run: | | ||
make test |
This file was deleted.
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
.PHONY: test build | ||
|
||
build: | ||
go build ./... | ||
|
||
test: | ||
go install ./cmd/... | ||
go generate . ./cmd/... | ||
go test ./... -cover -race -timeout=2m -json ./... | tparse |
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
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
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
Oops, something went wrong.