This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run NBGL tests | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
- develop | ||
pull_request: | ||
workflow_dispatch: | ||
jobs: | ||
test-access: | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.CI_BOT_TOKEN }} | ||
steps: | ||
- name: Test access to app-nbgl repository | ||
run: | | ||
if gh issue list --repo LedgerHQ/app-nbgl-tests; then | ||
echo "Access to the repository tests is successful." | ||
else | ||
echo "Failed to access the repository." | ||
fi | ||
- name: Test access to ledger-secure-sdk repository | ||
run: | | ||
if gh api -X GET /repos/LedgerHQ/app-nbgl-test; then | ||
echo "Access to the repository is successful." | ||
else | ||
echo "Failed to access the repository." | ||
fi | ||
run_NBGL_tests: | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.CI_BOT_TOKEN }} | ||
steps: | ||
- name: Test access to app-ethereum repository | ||
run: | | ||
if gh issue list --repo LedgerHQ/app-ethereum; then | ||
echo "Access to the repository is successful." | ||
else | ||
echo "Failed to access the repository." | ||
fi | ||
- name: Test access to app-nbgl repository | ||
run: | | ||
if gh issue list --repo LedgerHQ/app-nbgl-tests; then | ||
echo "Access to the repository tests is successful." | ||
else | ||
echo "Failed to access the repository." | ||
fi | ||
- name: Trigger the workflow in the target repository1 | ||
run: | | ||
gh api -X POST \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
/repos/LedgerHQ/ledger-secure-sdk/dispatches \ | ||
-f event_type=trigger-workflow \ | ||
-f client_payload='{"inputs":{"golden_run":"Open a PR"}}' | ||
- name: Trigger the workflow in the target repository21 | ||
run: | | ||
gh api -X POST \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
/repos/LedgerHQ/app-ethereum/dispatches \ | ||
-f event_type=trigger-workflow \ | ||
-f client_payload='{"inputs":{"golden_run":"Open a PR"}}' | ||
- name: Trigger the workflow in the target repository2 | ||
run: | | ||
gh api -X POST \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
/repos/LedgerHQ/app-nbgl-tests/dispatches \ | ||
-f event_type=trigger-workflow \ | ||
-f client_payload='{"inputs":{"golden_run":"Open a PR"}}' | ||
- name: Trigger the NBGL tests | ||
run: | | ||
curl -X POST \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
-H "Authorization: token $GITHUB_TOKEN" \ | ||
https://api.github.com/repos/LedgerHQ/app-nbgl-tests/dispatches \ | ||
-d '{"event_type":"trigger-workflow","client_payload":{"inputs":{"golden_run":"Open a PR"}}}' |