Add GitHub Action test for data analytics telemetry monitoring #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Analytics Telemetry Check | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
check-for-deprecated-v1-telemetry: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Check for deprecated telemetry calls | |
shell: bash | |
run: | | |
MATCHES="$(grep -rn "logEvent\|telemetryService.log\|logEvents\|eventLogger\.log" --include="*.{js,ts,tsx}")" | |
echo "matches: ${MATCHES}" | |
if [ -n "$MATCHES" ]; then | |
echo "Deprecated telemetry calls found" | |
echo "::error::Deprecated telemetry calls found: ${MATCHES}" | |
exit 1 | |
fi | |
# check-telemetry-event: | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v3 | |
# - name: Check for telemetry event with numbers | |
# shell: bash | |
# run: | | |
# MATCHES=$(grep -rn "telemetryRecorder\.recorderEvent\([^)]*\d+[^)]*\)" --include="*.{js,ts,tsx}") | |
# if [ -n "$MATCHES" ]; then | |
# echo "::error::Telemetry events with numbers found: $MATCHES" | |
# exit 1 | |
# fi |