Skip to content

Commit

Permalink
T-660225: Initial commit of Github PR audit (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
fivetran-seanmeisner authored Apr 10, 2024
1 parent b2b04f2 commit 8f17682
Show file tree
Hide file tree
Showing 5 changed files with 118 additions and 162 deletions.
92 changes: 92 additions & 0 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: Audit

on:
push:
branches: [main]
pull_request:
branches: [main]
types: [ opened, labeled, unlabeled, synchronize, reopened, edited ]

jobs:

audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.22

- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
version: "23.2"

- name: Set up protobuf for Go
working-directory: examples/connector/golang
run: go install google.golang.org/protobuf/cmd/[email protected]

- name: Set up protoc-gen-go
working-directory: examples/connector/golang
run: go install google.golang.org/grpc/cmd/[email protected]

- name: Set up Go protoc path
working-directory: examples/connector/golang
run: export PATH="$PATH:$(go env GOPATH)/bin"

- name: Verify dependencies
working-directory: examples/connector/golang
run: go mod verify

- name: Build Go connector
working-directory: examples/connector/golang
run: scripts/build.sh

- name: Run go vet
working-directory: examples/connector/golang
run: go vet ./...

- name: Install staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@latest

- name: Run staticcheck
working-directory: examples/connector/golang
run: staticcheck ./...

- name: Install golint
run: go install golang.org/x/lint/golint@latest

- name: Run golint
working-directory: examples/connector/golang
run: golint ./...

- name: Run tests
working-directory: examples/connector/golang
run: go test -race -vet=off ./...

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: 8.5

- name: Run Java connector copyProtos
working-directory: examples/connector/java
run: gradle copyProtos

- name: Run Java connector test with Gradle Wrapper
working-directory: examples/connector/java
run: gradle build

- name: Run Java destination copyProtos
working-directory: examples/destination/java
run: gradle copyProtos

- name: Run Java destination test with Gradle Wrapper
working-directory: examples/destination/java
run: gradle build
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
**/.idea
.DS_Store
.gradle
.idea
**/build/
**/golang/main
bin/*
Expand Down
13 changes: 9 additions & 4 deletions examples/connector/golang/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@ module fivetran.com/fivetran_sdk
go 1.21

require (
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
google.golang.org/genproto v0.0.0-20200806141610-86f49bd18e98
google.golang.org/grpc v1.59.0
google.golang.org/grpc/examples v0.0.0-20221110070601-689d061d46c7
google.golang.org/protobuf v1.27.1
google.golang.org/protobuf v1.31.0
)

require (
github.com/golang/protobuf v1.5.3 // indirect
golang.org/x/net v0.14.0 // indirect
golang.org/x/sys v0.11.0 // indirect
golang.org/x/text v0.12.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
)
Loading

0 comments on commit 8f17682

Please sign in to comment.