Skip to content

Commit

Permalink
try
Browse files Browse the repository at this point in the history
  • Loading branch information
ydshieh committed Mar 22, 2024
1 parent c21ec78 commit 4732297
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/self-scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -453,10 +453,11 @@ jobs:

send_results:
name: Slack Report
needs: [run_tests_gpu, run_tests_quantization_torch_gpu]
needs: [setup, run_tests_gpu, run_tests_quantization_torch_gpu]
if: ${{ always() }}
uses: ./.github/workflows/slack-report.yml
with:
job: ${{ inputs.job }}
setup_status: {{ needs.setup.result }}
env_name_for_slack_report_channel: ${{ inputs.env_name_for_slack_report_channel }}
secrets: inherit
7 changes: 5 additions & 2 deletions .github/workflows/slack-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
env_name_for_slack_report_channel:
required: true
type: string
setup_status:
required: true
type: string


jobs:
Expand All @@ -21,7 +24,7 @@ jobs:
shell: bash
# For the meaning of these environment variables, see the job `Setup`
run: |
echo "Setup status: ${{ needs.setup.result }}"
echo "Setup status: ${{ inputs.setup_status }}"
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
Expand All @@ -36,7 +39,7 @@ jobs:
CI_EVENT: scheduled
CI_SHA: ${{ github.sha }}
CI_WORKFLOW_REF: ${{ github.workflow_ref }}
# SETUP_STATUS: ${{ needs.setup.result }}
SETUP_STATUS: ${{ inputs.setup_status }}
# We pass `needs.setup.outputs.matrix` as the argument. A processing in `notification_service.py` to change
# `models/bert` to `models_bert` is required, as the artifact names use `_` instead of `/`.
run: |
Expand Down
8 changes: 6 additions & 2 deletions utils/notification_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -855,8 +855,12 @@ def prepare_reports(title, header, reports, to_truncate=True):

ENV_NAME_FOR_CI_SLACK_REPORT_CHANNEL_ID = os.environ["ENV_NAME_FOR_CI_SLACK_REPORT_CHANNEL_ID"]
CI_SLACK_REPORT_CHANNEL_ID = os.environ[ENV_NAME_FOR_CI_SLACK_REPORT_CHANNEL_ID]
print(ENV_NAME_FOR_CI_SLACK_REPORT_CHANNEL_ID)
print(CI_SLACK_REPORT_CHANNEL_ID[:4])

setup_status = os.environ.get("SETUP_STATUS")
print(type(setup_status))
print(len(setup_status))
print(setup_status)
exit(0)

# runner_status = os.environ.get("RUNNER_STATUS")
# runner_env_status = os.environ.get("RUNNER_ENV_STATUS")
Expand Down

0 comments on commit 4732297

Please sign in to comment.