Fix cicd unit tests #44
Workflow file for this run
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
name: CICD | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
golangLint: | |
name: Lint Scan | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '1.21' | |
cache: true | |
- name: golangci-lint | |
run: | | |
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest | |
golangci-lint --version | |
- name: Run Golangci Lint | |
id: lint | |
run: | | |
golangci-lint run --timeout 5m --issues-exit-code 0 --out-format=tab > lint_results_table.md | |
if [ -s lint_results_table.md ]; then | |
echo "Issues found" | |
echo "lint_flag=true" >> "$GITHUB_OUTPUT" | |
else | |
echo "No issues found" | |
fi | |
build: | |
name: build and test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.21' | |
- name: Build | |
run: go build -v ./... | |
- name: Run Unit Tests | |
run: | | |
go mod tidy | |
go test -v ./{/otel,/spanner,/tableConfig,/tableConfig,/translator,/utilities} | |
- name: Run Third Party Unit Tests | |
run: | | |
go mod tidy | |
go test -v ./{/third_party/datastax/proxycore,/third_party/datastax/proxy} |