Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: production-heartbeat
name: production-heartbeat-test
on:
schedule:
# Times are UTC
- cron: '45 1,5,9,13,17,21 * * *'
pull_request
# schedule:
# # Times are UTC
# - cron: '45 1,5,9,13,17,21 * * *'
jobs:
production-heartbeat:
strategy:
Expand Down Expand Up @@ -43,28 +44,26 @@ jobs:
name: smoke-test-results-${{ runner.os }}
path: smoke-test-results

# This part is commented out for now, so we can run the script for a day or two without risking blowing up PagerDuty.
# Once we've seen that it works properly, we'll re-enable the alerts.
# === Report any failures ===
# - name: Report failures
# if: ${{ failure() }}
# shell: bash
# env:
# # A link to this run
# RUN_LINK: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
# run: |
# curl --request POST \
# --data '{"payload": {
# "summary": "Production heartbeat script failed on ${{ runner.os }}",
# "source": "Github Actions",
# "severity": "critical",
# "custom_details": "SFDX install: ${{ steps.sfdx_install.outcome }}. Scanner install: ${{ steps.scanner_install.outcome }}. Smoke tests: ${{ steps.smoke_tests.outcome }}"
# },
# "links": [{
# "href": "${{ env.RUN_LINK }}",
# "text": "Link to action execution"
# }],
# "event_action": "trigger",
# "routing_key": "${{ secrets.PAGERDUTY_HEARTBEAT_KEY }}"
# }' \
# https://events.pagerduty.com/v2/enqueue
- name: Report failures
if: ${{ failure() }}
shell: bash
env:
# A link to this run
RUN_LINK: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
run: |
curl --request POST \
--data '{"payload": {
"summary": "Production heartbeat script failed on ${{ runner.os }}",
"source": "Github Actions",
"severity": "critical",
"custom_details": "SFDX install: ${{ steps.sfdx_install.outcome }}. Scanner install: ${{ steps.scanner_install.outcome }}. Smoke tests: ${{ steps.smoke_tests.outcome }}"
},
"links": [{
"href": "${{ env.RUN_LINK }}",
"text": "Link to action execution"
}],
"event_action": "trigger",
"routing_key": "${{ secrets.PAGERDUTY_HEARTBEAT_KEY }}"
}' \
https://events.pagerduty.com/v2/enqueue
2 changes: 1 addition & 1 deletion smoke-tests/smoke-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ $EXE_NAME scanner:rule:describe -n EmptyCatchBlock
echo "==== Describe a non-existent rule ===="
$EXE_NAME scanner:rule:describe -n NotAnActualRule
echo "==== Run rules against force-app, which should hit PMD and ESLint engines ===="
$EXE_NAME scanner:run --format junit --target test/code-fixtures/projects/app/force-app --outfile smoke-test-results/run1.xml
$EXE_NAME scanner:run --format foo --target test/code-fixtures/projects/app/force-app --outfile smoke-test-results/run1.xml
echo "==== Run rules against a typescript file, which should run ESLint-Typescript ===="
$EXE_NAME scanner:run --format junit --target test/code-fixtures/projects/ts/src/simpleYetWrong.ts --tsconfig test/code-fixtures/projects/tsconfig.json --outfile smoke-test-results/run2.xml
echo "==== Run RetireJS against a folder ===="
Expand Down