-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: change send/decode to node (#2)
* fix: change sendd/decode to node * Update pr-qa-sec.yaml * fix: CIs * fix: add need on ensure-code * fix: pull-request.yaml Co-authored-by: Matheus Brito <41240291+matbrito@users.noreply.github.com>
- Loading branch information
Showing
7 changed files
with
26 additions
and
222 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,60 +1,19 @@ | ||
name: Pull Request | ||
|
||
on: [pull_request] | ||
on: | ||
pull_request: | ||
branches: | ||
- develop | ||
- master | ||
push: | ||
branches: | ||
- develop | ||
- master | ||
|
||
jobs: | ||
config: | ||
uses: klever-io/workflow-calls/.github/workflows/go-setup.yaml@master | ||
with: | ||
with_vendor: false | ||
with_cache: false | ||
go_private: "github.com/klever-io/*" | ||
ensure-code: | ||
uses: klever-io/workflow-calls/.github/workflows/go-ci.yaml@master | ||
secrets: | ||
git_user: ${{ secrets.GIT_USER }} | ||
git_pass: ${{ secrets.GIT_PASS }} | ||
|
||
build: | ||
needs: [config] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: "1.18" | ||
|
||
- name: cache vendored dependencies | ||
id: cache-vendor | ||
uses: actions/cache@v2 | ||
with: | ||
path: vendor | ||
key: ${{ hashFiles('**/go.sum') }}-${{ secrets.CACHE_VERSION }} | ||
|
||
- name: GoImports Formatter | ||
run: | | ||
go install golang.org/x/tools/cmd/goimports@latest | ||
go mod tidy | ||
goimports -w -d $(find . -type f -name '*.go' -not -name '*.pb.go' -not -name '*_setter.go' -not -path "./vendor/*") | ||
# If there are any diffs from goimports or go mod tidy, fail. | ||
- name: Verify no changes from goimports and go mod tidy | ||
run: | | ||
if [ -n "$(git status --porcelain)" ]; then | ||
exit 1 | ||
fi | ||
- name: vendor dependencies | ||
run: | | ||
go mod vendor | ||
go install github.com/goware/modvendor@latest | ||
modvendor -copy="**/*.c **/*.h **/*.proto **/*.a" -v | ||
if: steps.cache-vendor.outputs.cache-hit != 'true' | ||
|
||
- name: ensure code is buildable | ||
run: | | ||
go vet ./... | ||
- name: ensure all test is passing | ||
run: | | ||
go clean -testcache | ||
go test ./... | ||
sonar_host_url: ${{ secrets.SONAR_HOST_URL }} | ||
sonar_token: ${{ secrets.SONAR_TOKEN }} | ||
twingate_sa: ${{ secrets.TWINGATE_SERVICE_ACCOUNT }} |
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
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,2 @@ | ||
.idea | ||
.vscode |
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