adding deprecation warning (#255) #50
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 workflow will build a Java project with Maven | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | |
name: CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./go | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Go environment | |
uses: actions/setup-go@v3 | |
with: | |
go-version: '1.19' | |
- name: Set envs | |
run: | | |
go env -w GOPATH=$GITHUB_WORKSPACE | |
go env -w GO111MODULE=auto | |
- name: Check go mod status | |
run: | | |
make gomod_tidy | |
if [[ ! -z $(git status -s) ]] | |
then | |
echo "Go mod state is not clean" | |
git diff "$GITHUB_SHA" | |
exit 1 | |
fi | |
- name: Build binary | |
run: make build | |
- name: Run Go tests | |
run: make test | |
- name: Run Gosec Security Scanner | |
working-directory: ./ | |
run: | | |
export PATH=$PATH:$(go env GOPATH)/bin | |
go install github.com/securego/gosec/v2/cmd/[email protected] | |
./run_gosec.sh | |
if [[ $? != 0 ]] | |
then | |
echo "gosec scanner failed to run " | |
exit 1 | |
fi | |
- name: Upload SARIF file | |
uses: github/codeql-action/upload-sarif@v2 | |
with: | |
# Path to SARIF file relative to the root of the repository | |
sarif_file: gosec.sarif |