From d75c595cf2f41f32f38da243663f01d8bdc8a27a Mon Sep 17 00:00:00 2001 From: aaron-congo Date: Mon, 4 Mar 2024 18:00:06 -0800 Subject: [PATCH 1/5] Output more detail if linter fails on CI --- .github/workflows/go.yml | 1 - go/Makefile | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index dcad8d56fc..e4dd4553ba 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -1,7 +1,6 @@ name: Go CI on: - workflow_dispatch: push: branches: [ "main" ] paths: diff --git a/go/Makefile b/go/Makefile index 1ec0145dfd..cc03565a08 100644 --- a/go/Makefile +++ b/go/Makefile @@ -46,9 +46,7 @@ lint: gofumpt -d . golines --dry-run --shorten-comments -m 127 . -lint-ci: - go vet ./... - staticcheck ./... +lint-ci: lint if [ "$$(gofumpt -l . | wc -l)" -gt 0 ]; then exit 1; fi if [ "$$(golines -l --shorten-comments -m 127 . | wc -l)" -gt 0 ]; then exit 1; fi From 63345bd614687d405483f5f34b3fa11bf136a0dd Mon Sep 17 00:00:00 2001 From: aaron-congo Date: Thu, 14 Mar 2024 14:40:42 -0700 Subject: [PATCH 2/5] Go: minor CI improvements --- go/Makefile | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/go/Makefile b/go/Makefile index cc03565a08..c1e4b501d1 100644 --- a/go/Makefile +++ b/go/Makefile @@ -21,12 +21,9 @@ install-tools-go1.22.0: install-build-tools install-dev-tools-go1.22.0 install-tools: install-tools-go1.22.0 -build: build-glide-core build-glide-client generate-protobuf +build: build-glide-client generate-protobuf go build ./... -build-glide-core: - cd ../glide-core; cargo build --release - build-glide-client: cargo build --release @@ -55,8 +52,8 @@ format: golines -w --shorten-comments -m 127 . test: - go test -v -race `go list ./... | grep -v protobuf` + go test -v -race ./... test-and-report: mkdir -p reports - go test -v -race `go list ./... | grep -v protobuf` -json | go-test-report -o reports/test-report.html + go test -v -race ./... -json | go-test-report -o reports/test-report.html From 33541611081c8d87260eabd6dd1efb9ca4298476 Mon Sep 17 00:00:00 2001 From: aaron-congo Date: Mon, 18 Mar 2024 09:52:40 -0700 Subject: [PATCH 3/5] Set LD_LIBRARY_PATH on ubuntu runners, remove test report --- .github/workflows/go.yml | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index e4dd4553ba..6e76f20a91 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -22,7 +22,7 @@ concurrency: jobs: build-and-test-go-client: - timeout-minutes: 20 + timeout-minutes: 45 strategy: # Run all jobs fail-fast: false @@ -68,6 +68,10 @@ jobs: working-directory: ./go run: make install-tools-go${{ matrix.go }} + - name: Set LD_LIBRARY_PATH + if: ${{ matrix.os == 'ubuntu-latest' }} + run: echo "LD_LIBRARY_PATH=$GITHUB_WORKSPACE/go/target/release/deps/" >> $GITHUB_ENV + - name: Build client working-directory: ./go run: make build @@ -78,16 +82,7 @@ jobs: - name: Run tests working-directory: ./go - run: make test-and-report - - - name: Upload test reports - if: always() - continue-on-error: true - uses: actions/upload-artifact@v4 - with: - name: test-reports-go-${{ matrix.go }}-redis-${{ matrix.redis }}-${{ matrix.os }} - path: | - go/reports/test-report.html + run: make test build-amazonlinux-latest: if: github.repository_owner == 'aws' @@ -153,15 +148,7 @@ jobs: - name: Run tests working-directory: ./go - run: make test-and-report - - - name: Upload test reports - if: always() - continue-on-error: true - uses: actions/upload-artifact@v4 - with: - name: test-reports-go-${{ matrix.go }}-amazon-linux-latest - path: go/reports/test-report.html + run: make test lint-rust: timeout-minutes: 15 From ecba9fe8f6946676fed61d84bdf3a2424600d35b Mon Sep 17 00:00:00 2001 From: aaron-congo Date: Mon, 18 Mar 2024 09:58:55 -0700 Subject: [PATCH 4/5] Change timeout value --- .github/workflows/go.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 6e76f20a91..dcd1c26060 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -22,7 +22,7 @@ concurrency: jobs: build-and-test-go-client: - timeout-minutes: 45 + timeout-minutes: 35 strategy: # Run all jobs fail-fast: false From 9523240feaac048c9bae2d3412c7df7476782d74 Mon Sep 17 00:00:00 2001 From: aaron-congo Date: Mon, 18 Mar 2024 13:46:21 -0700 Subject: [PATCH 5/5] Extend LD_LIBRARY_PATH instead of replacing it --- .github/workflows/go.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index dcd1c26060..805c46ba6c 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -70,7 +70,7 @@ jobs: - name: Set LD_LIBRARY_PATH if: ${{ matrix.os == 'ubuntu-latest' }} - run: echo "LD_LIBRARY_PATH=$GITHUB_WORKSPACE/go/target/release/deps/" >> $GITHUB_ENV + run: echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GITHUB_WORKSPACE/go/target/release/deps/" >> $GITHUB_ENV - name: Build client working-directory: ./go