Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/go_app_pull_requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,38 @@ jobs:
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
vulnerabilities:
#
# ensure go standards and tests pass
#
runs-on: ubuntu-latest
strategy:
matrix:
# List of go versions to test on.
go: ['^1']
steps:
# Checkout go code to test.
- name: Checkout repo
uses: actions/checkout@v3
# Setup Go for each version in the matrix.
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
# Use auth to get access to private Git repos for Go code dependencies.
- name: Configure git for private modules
env:
TOKEN: ${{ secrets.GH_CI_PAT }}
GITHUB_USERNAME: ${{ inputs.GH_CI_USER }}
run: git config --global url."https://${GITHUB_USERNAME}:${TOKEN}@github.com".insteadOf
"https://github.com"
# Install govulncheck
- id: install-govulncheck
run: go install golang.org/x/vuln/cmd/govulncheck@latest
# Run govulncheck for every Go module
- id: govulncheck
run: find . -name vendor -prune -o -name go.mod -print | xargs -n1 dirname
| xargs -n1 -I{} bash -c "pushd {}; govulncheck ./..."
docker-build:
#
# ensures the docker image will build without pushing to the registry
Expand Down
35 changes: 34 additions & 1 deletion .github/workflows/go_lib_pull_requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,37 @@ jobs:
- name: Upload test coverage results to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
token: ${{ secrets.CODECOV_TOKEN }}
vulnerabilities:
#
# ensure go standards and tests pass
#
runs-on: ubuntu-latest
strategy:
matrix:
# List of go versions to test on.
go: ["^1"]
steps:
# Checkout go code to test.
- name: Checkout repo
uses: actions/checkout@v3
# Setup Go for each version in the matrix.
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
# Use auth to get access to private Git repos for Go code dependencies.
- name: Configure git for private modules
env:
TOKEN: ${{ secrets.GH_CI_PAT }}
GITHUB_USERNAME: ${{ inputs.GH_CI_USER }}
run:
git config --global url."https://${GITHUB_USERNAME}:${TOKEN}@github.com".insteadOf
"https://github.com"
# Install govulncheck
- id: install-govulncheck
run: go install golang.org/x/vuln/cmd/govulncheck@latest
# Run govulncheck for every Go module
- id: govulncheck
run: find . -name vendor -prune -o -name go.mod -print | xargs -n1 dirname
| xargs -n1 -I{} bash -c "pushd {}; govulncheck ./..."