Skip to content

Commit

Permalink
Merge pull request #33 from Kochava/go-app-no-vendo3
Browse files Browse the repository at this point in the history
Go app no vendo3
  • Loading branch information
23caterpie authored Feb 28, 2024
2 parents 2b3cb45 + 06b1a57 commit 2699ede
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 14 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/go_app_pull_requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
# Checkout code to build.
- name: Checkout repo
uses: actions/checkout@v3
# Setup Go in order to vendor dependencies in a later step.
# Setup Go.
- name: Setup Go
uses: actions/setup-go@v3
with:
Expand Down Expand Up @@ -86,18 +86,14 @@ jobs:
GITHUB_USERNAME: ${{ inputs.GH_CI_USER }}
run: git config --global url."https://${GITHUB_USERNAME}:${TOKEN}@github.com".insteadOf
"https://github.com"
# Vendor Go code for ever Go module.
- name: go mod vendor
run: find . -name vendor -prune -o -name go.mod -print | xargs -n1 dirname
| xargs -n1 -I{} bash -c "pushd {}; go mod vendor"
# Go vet every Go module.
- name: go vet
run: find . -name vendor -prune -o -name go.mod -print | xargs -n1 dirname
| xargs -n1 -I{} bash -c "pushd {}; go vet ./..."
# Run unit test for evet Go module.
- name: go test
run: find . -name vendor -prune -o -name go.mod -print | xargs -n1 dirname
| xargs -n1 -I{} bash -c "pushd {}; go test -mod=vendor --race -v ./..."
| xargs -n1 -I{} bash -c "pushd {}; go test --race -v ./..."
docker-build:
#
# ensures the docker image will build without pushing to the registry
Expand All @@ -108,7 +104,7 @@ jobs:
# Checkout code to build.
- name: Checkout repo
uses: actions/checkout@v3
# Setup Go in order to vendor dependencies in a later step.
# Setup Go.
- name: Setup Go
uses: actions/setup-go@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/go_app_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
steps:
# Checkout code needed to build docker image.
- uses: actions/checkout@v3
# Setup Go in order to vendor dependencies in a later setp.
# Setup Go.
- name: Setup Go
uses: actions/setup-go@v3
with:
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/go_lib_pull_requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
# Checkout code to build.
- name: Checkout repo
uses: actions/checkout@v3
# Setup Go in order to vendor dependencies in a later step.
# Setup Go.
- name: Setup Go
uses: actions/setup-go@v3
with:
Expand Down Expand Up @@ -86,15 +86,11 @@ jobs:
GITHUB_USERNAME: ${{ inputs.GH_CI_USER }}
run: git config --global url."https://${GITHUB_USERNAME}:${TOKEN}@github.com".insteadOf
"https://github.com"
# Vendor Go code for ever Go module.
- name: go mod vendor
run: find . -name vendor -prune -o -name go.mod -print | xargs -n1 dirname
| xargs -n1 -I{} bash -c "pushd {}; go mod vendor"
# Go vet every Go module.
- name: go vet
run: find . -name vendor -prune -o -name go.mod -print | xargs -n1 dirname
| xargs -n1 -I{} bash -c "pushd {}; go vet ./..."
# Run unit test for evet Go module.
- name: go test
run: find . -name vendor -prune -o -name go.mod -print | xargs -n1 dirname
| xargs -n1 -I{} bash -c "pushd {}; go test -mod=vendor --race -v ./..."
| xargs -n1 -I{} bash -c "pushd {}; go test --race -v ./..."

0 comments on commit 2699ede

Please sign in to comment.