Skip to content

scheduled-test-stats #8

scheduled-test-stats

scheduled-test-stats #8

name: scheduled-test-stats
on:
schedule:
- cron: '0 0 * * 1' # Every Monday at 06:00 AM UTC
workflow_dispatch:
jobs:
run-script:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Execute stats
id: step_one
run: |
stats_output=$(node bin/gather-test-stats.js)
echo $stats_output
echo "instana_test_stats=$stats_output" >> $GITHUB_ENV
- name: Send slack message
id: step_two
uses: slackapi/slack-github-action@v1.21.0
with:
channel-id: ${{ secrets.SLACK_CHANNEL_ID_TEAM }}
payload: |
{
"text": "Team Node.js Test Stats",
"attachments": [{
"color": "good",
"fields": [
{
"title": "Test Files / Test Cases",
"value": "$instana_test_stats"
}
]
}]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}