Skip to content

Commit

Permalink
Merge pull request #6 from LedgerHQ/update
Browse files Browse the repository at this point in the history
Update
  • Loading branch information
sgliner-ledger authored Nov 7, 2023
2 parents b833efa + fe22b29 commit 244c7f2
Show file tree
Hide file tree
Showing 6 changed files with 121 additions and 4 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/build_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -585,9 +585,12 @@ jobs:
python3 scripts/output_scripts/convert.py --input_file full_build_output.json --output_file out.md --key build
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: |
python3 scripts/output_scripts/slack.py --input_file full_build_output.json --output_file slack.json --key build --devices ${{ needs.setup-devices.outputs.names }}
python3 scripts/output_scripts/slack.py --input_file full_build_output.json --output_file slack.json --key build --devices ${{ needs.setup-devices.outputs.names }} --url ${{ env.url }}
- name: Send custom JSON data to Slack workflow
if: ${{ github.event_name == 'schedule' || inputs.send_to_slack == true }}
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/refresh_inputs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ jobs:
else
echo "Files are the same!"
fi
- name: Echo GHA url
if: ${{ failure() && (github.event_name == 'schedule' || inputs.send_to_slack == true) }}
run: echo "url"=${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} >> $GITHUB_ENV

- name: Send custom JSON data to Slack workflow
if: ${{ failure() && (github.event_name == 'schedule' || inputs.send_to_slack == true) }}
id: slack
Expand All @@ -59,7 +63,8 @@ jobs:
{
"title": "Check input list",
"status": ":red-cross: Fail",
"status_detail": ":alert: Please update input file ! "
"status_detail": ":alert: Please update input file ! ",
"url": "${{ env.url }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/scan_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -562,9 +562,12 @@ jobs:
python3 scripts/output_scripts/convert.py --input_file full_scan_output.json --output_file out.md --key scan
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: |
python3 scripts/output_scripts/slack.py --input_file full_scan_output.json --output_file slack.json --key scan --devices ${{ needs.setup-devices.outputs.names }}
python3 scripts/output_scripts/slack.py --input_file full_scan_output.json --output_file slack.json --key scan --devices ${{ needs.setup-devices.outputs.names }} --url ${{ env.url }}
- name: Send custom JSON data to Slack workflow
if: ${{ github.event_name == 'schedule' || inputs.send_to_slack == true }}
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/test_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -354,9 +354,12 @@ jobs:
python scripts/output_scripts/convert.py --input_file 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/output_scripts/slack.py --input_file test_output.json --output_file slack.json --key test
python scripts/output_scripts/slack.py --input_file 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 Down
100 changes: 100 additions & 0 deletions input_files/input.json
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,11 @@
"nanox",
"stax"
],
"scan_whitelist": [
"nanos",
"nanosp",
"nanox"
],
"variant_param": "COIN",
"variants_nanos": [
"binance_chain"
Expand All @@ -493,6 +498,12 @@
"nanox",
"stax"
],
"scan_whitelist": [
"nanos",
"nanosp",
"nanox",
"stax"
],
"variant_param": "COIN",
"variants_nanos": [
"bitcoin_testnet_legacy",
Expand Down Expand Up @@ -623,6 +634,12 @@
"nanox",
"stax"
],
"scan_whitelist": [
"nanos",
"nanosp",
"nanox",
"stax"
],
"variant_param": "COIN",
"variants_nanos": [
"bitcoin_testnet",
Expand Down Expand Up @@ -670,6 +687,12 @@
"ref": "master",
"url": "https://github.com/LedgerHQ/app-boilerplate",
"test_dir": "tests",
"scan_whitelist": [
"nanos",
"nanosp",
"nanox",
"stax"
],
"variant_param": "COIN",
"variants_nanos": [
"BOL"
Expand Down Expand Up @@ -700,6 +723,12 @@
"nanosp",
"nanox",
"stax"
],
"scan_whitelist": [
"nanos",
"nanosp",
"nanox",
"stax"
]
},
{
Expand Down Expand Up @@ -761,6 +790,12 @@
"nanox",
"stax"
],
"scan_whitelist": [
"nanos",
"nanosp",
"nanox",
"stax"
],
"variant_param": "COIN",
"variants_nanos": [
"cardano_ada"
Expand Down Expand Up @@ -1005,6 +1040,11 @@
"nanox",
"stax"
],
"scan_whitelist": [
"nanos",
"nanosp",
"nanox"
],
"variant_param": "COIN",
"variants_nanos": [
"cro_org"
Expand Down Expand Up @@ -1231,6 +1271,12 @@
"url": "https://github.com/LedgerHQ/app-ethereum",
"test_dir": "tests/ragger",
"extra_flags": "DEBUG=1 CAL_CI_KEY=1 DOMAIN_NAME_TEST_KEY=1",
"scan_whitelist": [
"nanos",
"nanosp",
"nanox",
"stax"
],
"variant_param": "CHAIN",
"variants_nanos": [
"akroma",
Expand Down Expand Up @@ -1504,6 +1550,12 @@
"nanox",
"stax"
],
"scan_whitelist": [
"nanos",
"nanosp",
"nanox",
"stax"
],
"variant_param": "COIN",
"variants_nanos": [
"exchange"
Expand Down Expand Up @@ -2403,6 +2455,12 @@
"url": "https://github.com/LedgerHQ/app-monero",
"test_dir": "tests",
"extra_flags": "DEBUG=1",
"scan_whitelist": [
"nanos",
"nanosp",
"nanox",
"stax"
],
"variant_param": "COIN",
"variants_nanos": [
"monero"
Expand Down Expand Up @@ -2578,6 +2636,12 @@
"nanox",
"stax"
],
"scan_whitelist": [
"nanos",
"nanosp",
"nanox",
"stax"
],
"variant_param": "COIN",
"variants_nanos": [
"NEO3"
Expand Down Expand Up @@ -2814,6 +2878,12 @@
"url": "https://github.com/LedgerHQ/app-passwords",
"test_dir": "tests/functional",
"extra_flags": "TESTING=1 POPULATE=1",
"scan_whitelist": [
"nanos",
"nanosp",
"nanox",
"stax"
],
"variant_param": "NONE",
"variants_nanos": [
"pwmgr"
Expand Down Expand Up @@ -3074,6 +3144,12 @@
"nanox",
"stax"
],
"scan_whitelist": [
"nanos",
"nanosp",
"nanox",
"stax"
],
"variant_param": "COIN",
"variants_nanos": [
"pbol"
Expand Down Expand Up @@ -3981,6 +4057,12 @@
"nanosp",
"nanox"
],
"scan_whitelist": [
"nanos",
"nanosp",
"nanox",
"stax"
],
"variant_param": "APP",
"variants_nanos": [
"recovery_check"
Expand Down Expand Up @@ -4112,6 +4194,12 @@
],
"test_param_nanosp": "--fast",
"test_param_nanox": "--transport HID --fast",
"scan_whitelist": [
"nanos",
"nanosp",
"nanox",
"stax"
],
"variant_param": "APP",
"variants_nanox": [
"SecurityKey"
Expand Down Expand Up @@ -4640,6 +4728,12 @@
"ref": "develop",
"url": "https://github.com/LedgerHQ/app-tron",
"test_dir": "tests",
"scan_whitelist": [
"nanos",
"nanosp",
"nanox",
"stax"
],
"variant_param": "COIN",
"variants_nanos": [
"tron"
Expand Down Expand Up @@ -4855,6 +4949,12 @@
"url": "https://github.com/LedgerHQ/app-xrp",
"test_dir": "tests",
"extra_flags": "DEBUG=1",
"scan_whitelist": [
"nanos",
"nanosp",
"nanox",
"stax"
],
"variant_param": "COIN",
"variants_nanos": [
"xrp"
Expand Down
3 changes: 3 additions & 0 deletions scripts/output_scripts/slack.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ def count_status(json_list, key):
parser.add_argument("--output_file", required=False, type=Path)
parser.add_argument("--key", required=False, type=str, default="build")
parser.add_argument("--devices", required=False, type=str)
parser.add_argument("--url", required=False, type=str)

args = parser.parse_args()

Expand Down Expand Up @@ -115,6 +116,8 @@ def count_status(json_list, key):
if status_detail:
slack_json["status_detail"] = status_detail

slack_json["url"] = args.url

if args.output_file:
with open(args.output_file, 'w') as f:
json.dump(slack_json, f, indent=1)
Expand Down

0 comments on commit 244c7f2

Please sign in to comment.