test(chat,playout): enable test suite, coverage gate, switch to pure-Go SQLite driver
This commit is contained in:
1 parent
b3a10ba3ef
commit
e8a43b8a79
16 files changed
+3257
-8
No files matched your search
+11
-1
@@ -43,7 +43,17 @@ jobs:
|
||||
run: cd backend/chat && GOTOOLCHAIN=local go vet ./...
|
||||
|
||||
- name: Run Tests
|
||||
run: echo "Tests will be added in future CI steps"
|
||||
run: cd backend/chat && GOTOOLCHAIN=local go test ./... -v -cover -coverprofile=coverage.out -race
|
||||
|
||||
- name: Check Coverage
|
||||
run: |
|
||||
cd backend/chat
|
||||
COVERAGE=$(GOTOOLCHAIN=local go tool cover -func=coverage.out | grep total | awk '{print $3}' | sed 's/%//')
|
||||
echo "Coverage: $COVERAGE%"
|
||||
if [ "$(echo "$COVERAGE < 50" | bc)" -eq 1 ]; then
|
||||
echo "Coverage $COVERAGE% below 50% threshold"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
docker:
|
||||
needs: test
|
||||
|
||||
Reference in new issue
Block a user