Remove kmysql tests from CI, it failts too often

The mysql container is failing to start too often, which is
forcing me to rerun the CI several times just so the kmysql tests pass
pull/20/head
Vinícius Garcia 2022-03-27 09:58:20 -03:00
parent 4e3cc96919
commit 1ce6aa9634
3 changed files with 26 additions and 23 deletions

View File

@ -20,7 +20,7 @@ jobs:
- name: Run golint
run: go get golang.org/x/lint/golint && bash -c "$(go env GOPATH)/bin/golint -set_exit_status -min_confidence 0.9 ./..."
- name: Run Tests
run: ./run-all-tests.sh
run: ./scripts/run-all-tests.sh
- name: Run Coverage
run: bash <(curl -s https://codecov.io/bash)
env:

View File

@ -1,22 +0,0 @@
#!/usr/bin/env bash
# Make sure the script will stop on error:
set -ueo pipefail
# Generate the coverate.txt file for all modules:
# Run ksql root module tests:
go test -coverprofile=coverage.txt -covermode=atomic -coverpkg=github.com/vingarcia/ksql ./...
# Run the tests for the examples module:
( cd examples ; go test -coverprofile=coverage.txt -covermode=atomic -coverpkg=github.com/vingarcia/ksql ./... )
# Make sure the run-with-replace.sh is on PATH:
export PATH=$PATH:$(pwd)/scripts
# Then for each adapter run the tests with the replace directive:
for dir in $(find adapters -name go.mod -printf '%h\n'); do
( cd $dir ; run-with-replace.sh go test -coverprofile=coverage.txt -covermode=atomic -coverpkg=github.com/vingarcia/ksql ./... )
done
# codecov will find all `coverate.txt` files, so it will work fine.

25
scripts/run-all-tests.sh Executable file
View File

@ -0,0 +1,25 @@
#!/usr/bin/env bash
# Make sure the script will stop on error:
set -ueo pipefail
# Generate the coverate.txt file for all modules:
# Run ksql root module tests:
go test -coverprofile=coverage.txt -covermode=atomic -coverpkg=github.com/vingarcia/ksql ./...
# Run the tests for the examples module:
( cd examples ; go test -coverprofile=coverage.txt -covermode=atomic -coverpkg=github.com/vingarcia/ksql ./... )
# Make sure the run-with-replace.sh is on PATH:
export PATH=$PATH:$(pwd)/scripts
# Then for each adapter run the tests with the replace directive:
( cd adapters/kpgx ; run-with-replace.sh go test -coverprofile=coverage.txt -covermode=atomic -coverpkg=github.com/vingarcia/ksql ./... )
( cd adapters/ksqlite3 ; run-with-replace.sh go test -coverprofile=coverage.txt -covermode=atomic -coverpkg=github.com/vingarcia/ksql ./... )
( cd adapters/ksqlserver ; run-with-replace.sh go test -coverprofile=coverage.txt -covermode=atomic -coverpkg=github.com/vingarcia/ksql ./... )
# Disabled this one because the mysql container fails to start too often on the CI:
#( cd adapters/kmysql ; run-with-replace.sh go test -coverprofile=coverage.txt -covermode=atomic -coverpkg=github.com/vingarcia/ksql ./... )
# codecov will find all `coverate.txt` files, so it will work fine.