fix: resolve unit test hanging issue and remove MySQL from CI

- Add --no-cfg-coverage flags to prevent test instrumentation conflicts
- Remove MySQL service and test runs from CI workflow
- Add concurrency controls to cancel redundant workflow runs
- Consolidate cleanup commands for better readability
This commit is contained in:
ByteBaker
2025-10-15 10:55:28 +05:30
committed by sktrpathi
parent 40bbbe7f2e
commit bc38057bbd
2 changed files with 9 additions and 23 deletions
+7 -23
View File
@@ -16,6 +16,10 @@ on:
- "**.yml"
- "**.yaml"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
COLUMNS: 150
ZO_RESULT_CACHE_ENABLED: true
@@ -38,13 +42,6 @@ jobs:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
mysql:
image: mysql:9.3
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: mysql
ports:
- 3306:3306
steps:
- name: Clone the current repo
@@ -93,7 +90,7 @@ jobs:
if: steps.check_changes.outputs.has_changes == 'true'
run: cargo fmt --all -- --check
- name: Setup cargo config
- name: Run clippy
if: steps.check_changes.outputs.has_changes == 'true'
run: cargo --config net.git-fetch-with-cli=true clippy -- -D warnings
@@ -111,9 +108,7 @@ jobs:
./coverage.sh run-cov
# cleanup
rm -rf data
rm -rf ./json
rm -rf ./src/infra/data
rm -rf data ./json ./src/infra/data
# Run with sqlite
echo "Running with sqlite"
@@ -121,18 +116,7 @@ jobs:
export ZO_META_POSTGRES_DSN=""
./coverage.sh run-cov
# cleanup
rm -rf data
rm -rf ./json
rm -rf ./src/infra/data
# setup and run with mysql
echo "Running with mysql"
export ZO_META_STORE=mysql
export ZO_META_MYSQL_DSN=mysql://root:password@localhost:3306/mysql
./coverage.sh run-cov
# finally print the coverage data
# finally check the coverage data
./coverage.sh check
ui_unit_tests:
+2
View File
@@ -30,6 +30,8 @@ _cov_test() {
cargo llvm-cov nextest \
--workspace \
--verbose \
--no-cfg-coverage \
--no-cfg-coverage-nightly \
--ignore-filename-regex 'job|.*generated.*' \
--test-threads=1 \
--no-fail-fast \