Skip to content

High-performance browser automation bridge and multi-instance orchestrator with advanced stealth injection and real-time dashboard.

ci: add go-testreport for test result summaries in GitHub Actions

Mario9fef6af3901b
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 1cbb3991..77a7c030 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -38,11 +38,20 @@ jobs:
- name: Build
run: go build -o pinchtab ./cmd/pinchtab
+ - name: Install go-testreport
+ run: go install github.com/beheran/go-testreport@latest
+
- name: Test with coverage
- run: go test ./... -v -count=1 -coverprofile=coverage.out -covermode=atomic
+ run: go test ./... -v -count=1 -coverprofile=coverage.out -covermode=atomic -json | tee test-results.json | go-testreport -markdown >> $GITHUB_STEP_SUMMARY
- name: Coverage summary
- run: go tool cover -func=coverage.out | tail -1
+ run: |
+ coverage=$(go tool cover -func=coverage.out | tail -1)
+ echo "" >> $GITHUB_STEP_SUMMARY
+ echo "### Coverage" >> $GITHUB_STEP_SUMMARY
+ echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
+ echo "$coverage" >> $GITHUB_STEP_SUMMARY
+ echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
lint:
name: Lint
diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml
index 934b2147..b72e9786 100644
--- a/.github/workflows/integration.yml
+++ b/.github/workflows/integration.yml
@@ -30,9 +30,21 @@ jobs:
sudo apt-get install -y google-chrome-stable
echo "CHROME_BINARY=/usr/bin/google-chrome" >> $GITHUB_ENV
+ - name: Install go-testreport
+ run: go install github.com/beheran/go-testreport@latest
+
- name: Run integration tests
- run: go test -tags integration -v -timeout 10m -count=1 ./tests/integration/
+ run: go test -tags integration -v -timeout 10m -count=1 -json ./tests/integration/ | tee integration-results.json | go-testreport -markdown >> $GITHUB_STEP_SUMMARY
env:
BRIDGE_HEADLESS: "true"
BRIDGE_NO_RESTORE: "true"
PINCHTAB_TEST_PORT: "19867"
+
+ - name: Integration test summary
+ if: always()
+ run: |
+ echo "" >> $GITHUB_STEP_SUMMARY
+ echo "### Integration Test Details" >> $GITHUB_STEP_SUMMARY
+ if [ -f integration-results.json ]; then
+ jq '.Summary' integration-results.json >> $GITHUB_STEP_SUMMARY || true
+ fi