Skip to content

Commit

Permalink
Debugging unit test timeout in CI (#2118)
Browse files Browse the repository at this point in the history
Signed-off-by: Sreekanth <[email protected]>
  • Loading branch information
BulkBeing authored Oct 3, 2024
1 parent 772907a commit 7586ffb
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 12 deletions.
37 changes: 26 additions & 11 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- name: Setup Golang
uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version: "1.22"
- name: Add bins to PATH
run: |
echo /home/runner/go/bin >> $GITHUB_PATH
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
--health-timeout 5s
--health-retries 5
nats:
image: 'bitnami/nats:latest'
image: "bitnami/nats:latest"
ports:
- 4222:4222
env:
Expand All @@ -81,7 +81,7 @@ jobs:
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version: "1.22"
id: go

- name: Check out code
Expand All @@ -94,11 +94,11 @@ jobs:
key: ${{ runner.os }}-go-build-v1-${{ github.run_id }}

- name: Get dependencies
run: go mod download
run: go mod download -x

- name: Test Go
run: make test-coverage-with-isb

- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
Expand All @@ -119,7 +119,7 @@ jobs:
- name: Test Rust
working-directory: ./rust
run: |
CARGO_INCREMENTAL=0 RUSTFLAGS='-Cinstrument-coverage' LLVM_PROFILE_FILE='./target/debug/coverage/cargo-test-%p-%m.profraw' cargo test --all-features --workspace --all
CARGO_INCREMENTAL=0 RUSTFLAGS='-Cinstrument-coverage' LLVM_PROFILE_FILE='./target/debug/coverage/cargo-test-%p-%m.profraw' cargo test --all-features --workspace --all
grcov . -s ./target/debug/coverage/ --binary-path ./target/debug/ -t lcov --branch --ignore-not-existing -o ./target/debug/coverage/lcov.info
- name: Check Rust formatting
Expand All @@ -145,7 +145,7 @@ jobs:
- name: Setup Golang
uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version: "1.22"
- name: Restore Go build cache
uses: actions/cache@v4
with:
Expand All @@ -165,7 +165,7 @@ jobs:
uses: actions-rust-lang/[email protected]
with:
cache-workspaces: rust -> target
rustflags: ''
rustflags: ""
- name: Configure sccache
run: |
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
Expand All @@ -192,13 +192,28 @@ jobs:
e2e-tests:
name: E2E Tests
runs-on: ubuntu-latest
needs: [ build-rust-amd64 ]
needs: [build-rust-amd64]
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
driver: [jetstream]
case: [e2e, diamond-e2e, transformer-e2e, kafka-e2e, map-e2e, reduce-one-e2e, reduce-two-e2e, udsource-e2e, api-e2e, sideinputs-e2e, idle-source-e2e, monovertex-e2e, builtin-source-e2e]
case:
[
e2e,
diamond-e2e,
transformer-e2e,
kafka-e2e,
map-e2e,
reduce-one-e2e,
reduce-two-e2e,
udsource-e2e,
api-e2e,
sideinputs-e2e,
idle-source-e2e,
monovertex-e2e,
builtin-source-e2e,
]
include:
- driver: redis
case: e2e
Expand All @@ -218,7 +233,7 @@ jobs:
- name: Setup Golang
uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version: "1.22"
- name: Add bins to PATH
run: |
echo /home/runner/go/bin >> $GITHUB_PATH
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ test-coverage:

.PHONY: test-coverage-with-isb
test-coverage-with-isb:
go test -covermode=atomic -coverprofile=test/profile.cov -tags=isb_redis $(shell go list ./... | grep -v /vendor/ | grep -v /numaflow/test/ | grep -v /pkg/client/ | grep -v /pkg/proto/ | grep -v /hack/)
go test -v -timeout 7m -covermode=atomic -coverprofile=test/profile.cov -tags=isb_redis $(shell go list ./... | grep -v /vendor/ | grep -v /numaflow/test/ | grep -v /pkg/client/ | grep -v /pkg/proto/ | grep -v /hack/)
go tool cover -func=test/profile.cov

.PHONY: test-code
Expand Down

0 comments on commit 7586ffb

Please sign in to comment.