Skip to content

Commit

Permalink
Merge pull request #14 from LedgerHQ/update
Browse files Browse the repository at this point in the history
Misc updates
  • Loading branch information
sgliner-ledger authored Dec 1, 2023
2 parents ce3aa38 + 0437c2b commit 8a96239
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/test_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -340,26 +340,26 @@ jobs:

- name: Merge output files
run: |
python scripts/entrypoint.py merge_output --input_pattern "test_output_*.json" --output_file test_output.json --key "test"
python scripts/entrypoint.py merge_output --input_pattern "test_output_*.json" --output_file full_test_output.json --key "test"
- name: Archive output file
uses: actions/upload-artifact@v3
if: always()
with:
name: report.json
path: test_output.json
name: full_test_output.json
path: full_test_output.json

- name: Convert to markdown
run: |
python scripts/entrypoint.py convert_output --input_file test_output.json --output_file out.md --key test
python scripts/entrypoint.py convert_output --input_file full_test_output.json --output_file out.md --key test
cat out.md >> $GITHUB_STEP_SUMMARY
- name: Echo GHA url
run: echo "url"=${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} >> $GITHUB_ENV

- name: Convert to slack json
run: |
python scripts/entrypoint.py slack_output --input_file test_output.json --output_file slack.json --key test --url ${{ env.url }}
python scripts/entrypoint.py slack_output --input_file full_test_output.json --output_file slack.json --key test --url ${{ env.url }}
- name: Send custom JSON data to Slack workflow
if: ${{ github.event_name == 'schedule' || inputs.send_to_slack == true }}
Expand All @@ -372,4 +372,4 @@ jobs:

- name: Set job status
run: |
python scripts/entrypoint.py status_output --input_file test_output.json --key test
python scripts/entrypoint.py status_output --input_file full_test_output.json --key test
12 changes: 9 additions & 3 deletions scripts/output_scripts/slack.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,16 @@ def main(args: Namespace) -> None:
if details:
fail_status += f"\t{app_name}\n"
if isinstance(details, dict):
device_status = ""
for device, variant in details.items():
fail_status += f"\t\t - {device}: \n"
for v in variant:
fail_status += f"\t\t\t{v}\n"
if not device_status:
device_status = "\t\t"
else:
device_status += ", "
device_status += device
if device_status:
fail_status += f"{device_status} \n"

else:
for device in details:
fail_status += f"\t\t- {device}\n"
Expand Down

0 comments on commit 8a96239

Please sign in to comment.