-
Notifications
You must be signed in to change notification settings - Fork 350
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1,409 changed files
with
81,463 additions
and
27,177 deletions.
There are no files selected for viewing
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,6 @@ on: | |
description: Ignore test having name pattern (entered in the previous field) | ||
type: boolean | ||
default: false | ||
|
||
report_path: | ||
description: Path where you want to store this execution's results | ||
required: false | ||
|
@@ -32,6 +31,21 @@ on: | |
required: false | ||
type: boolean | ||
default: false | ||
export_to_xray: | ||
description: Send tests results to Xray | ||
required: false | ||
type: boolean | ||
default: false | ||
test_execution: | ||
description: "Test Execution ticket ID" | ||
required: false | ||
type: string | ||
default: "B2CQA-2461" | ||
enable_send_test: | ||
description: Enable broadcast | ||
required: false | ||
type: boolean | ||
default: false | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref_name != 'develop' && github.ref || github.run_id }} | ||
|
@@ -53,8 +67,7 @@ jobs: | |
CI_OS: "ubuntu-latest" | ||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 | ||
SPECULOS_IMAGE_TAG: ghcr.io/ledgerhq/speculos:0.9.5 | ||
# DEBUG: "pw:browser*" | ||
# DEBUG_LOGS: 1 | ||
ENABLE_BROADCAST_TEST: ${{ inputs.enable_send_test }} | ||
runs-on: [ledger-live-4xlarge] | ||
strategy: | ||
fail-fast: false | ||
|
@@ -65,6 +78,17 @@ jobs: | |
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ inputs.ref || github.sha }} | ||
|
||
- name: Setup broadcast environment variables | ||
id: set-env | ||
run: | | ||
day=$(date +%u) | ||
if [ $day -eq 1 ] || "$ENABLE_BROADCAST_TEST" = "1" ; then | ||
echo "ENABLE_TRANSACTION_BROADCAST=1" >> $GITHUB_ENV | ||
else | ||
echo "DISABLE_TRANSACTION_BROADCAST=1" >> $GITHUB_ENV | ||
fi | ||
- name: Setup caches | ||
id: caches | ||
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-caches@develop | ||
|
@@ -80,7 +104,7 @@ jobs: | |
skip_ruby: true | ||
install_playwright: true | ||
turborepo-server-port: ${{ steps.caches.outputs.port }} | ||
- name: generate token | ||
- name: Generate token | ||
id: generate-token | ||
uses: tibdex/github-app-token@v1 | ||
with: | ||
|
@@ -93,41 +117,39 @@ jobs: | |
repository: LedgerHQ/coin-apps | ||
token: ${{ steps.generate-token.outputs.token }} | ||
path: coin-apps | ||
- name: pull docker image | ||
- name: Pull docker image | ||
run: docker pull ${{ env.SPECULOS_IMAGE_TAG }} | ||
shell: bash | ||
- name: Run playwright tests [Linux => xvfb-run] | ||
id: tests | ||
run: | | ||
export SPECULOS_IMAGE_TAG=${{ env.SPECULOS_IMAGE_TAG }} | ||
export COINAPPS=$PWD/coin-apps | ||
export ENABLE_TRANSACTION_BROADCAST=1 | ||
export MOCK=0 | ||
if [ "${{ inputs.invert_filter }}" = true ]; then invert_filter="-invert"; fi | ||
xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- pnpm desktop test:playwright:speculos ${INPUTS_TEST_FILTER:+--grep$invert_filter} "${{ inputs.test_filter }}" --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }} | ||
env: | ||
INPUTS_TEST_FILTER: ${{ inputs.test_filter }} | ||
SEED: ${{ secrets.SEED_QAA_B2C }} | ||
XRAY: ${{ inputs.export_to_xray }} | ||
TEST_EXECUTION: ${{ inputs.test_execution }} | ||
PROJECT_KEY: B2CQA | ||
|
||
- name: Upload Allure Results | ||
if: ${{ !cancelled() }} | ||
uses: actions/[email protected] | ||
with: | ||
retention-days: 1 | ||
name: allure-results-${{ matrix.shardIndex }} | ||
path: "apps/ledger-live-desktop/allure-results" | ||
|
||
- name: Upload playwright test results [On Failure] | ||
- name: Upload Xray Results | ||
if: ${{ !cancelled() && inputs.export_to_xray }} | ||
uses: actions/[email protected] | ||
if: failure() && !cancelled() | ||
with: | ||
name: playwright-results-${{ matrix.shardIndex }} | ||
path: | | ||
apps/ledger-live-desktop/tests/artifacts/test-results | ||
apps/ledger-live-desktop/tests/artifacts/html-report | ||
apps/ledger-live-desktop/tests/artifacts/coverage | ||
apps/ledger-live-desktop/tests/artifacts/videos | ||
apps/ledger-live-desktop/tests/artifacts/logs | ||
apps/ledger-live-desktop/tests/artifacts/*.log | ||
retention-days: 1 | ||
name: xray-reports-${{ matrix.shardIndex }} | ||
path: apps/ledger-live-desktop/tests/artifacts/xray/xray-report.json | ||
|
||
report-and-notify: | ||
name: "Report and Notify" | ||
|
@@ -277,7 +299,6 @@ jobs: | |
if (${{ !inputs.slack_notif && github.event_name == 'workflow_dispatch' }}) return; | ||
const slackPayload = { | ||
"text": "Ledger Live Desktop tests results on ${{github.ref_name}}", | ||
"attachments": [ | ||
{ | ||
"color": "${{ env.STATUS_COLOR }}", | ||
|
@@ -286,20 +307,13 @@ jobs: | |
"type": "header", | ||
"text": { | ||
"type": "plain_text", | ||
"text": ":ledger-logo: Ledger Live Desktop tests results on ${{ github.ref_name }}", | ||
"text": ":ledger-logo: Ledger Live Desktop E2E tests results on ${{ github.ref_name }}", | ||
"emoji": true | ||
} | ||
}, | ||
{ | ||
"type": "divider" | ||
}, | ||
{ | ||
"type": "header", | ||
"text": { | ||
"type": "plain_text", | ||
"text": "E2E Tests" | ||
} | ||
}, | ||
{ | ||
"type": "section", | ||
"text": { | ||
|
@@ -342,3 +356,56 @@ jobs: | |
payload-file-path: ${{ github.workspace }}/payload-slack-content.json | ||
env: | ||
SLACK_BOT_TOKEN: ${{ secrets.SLACK_LIVE_CI_BOT_TOKEN }} | ||
|
||
upload-to-xray: | ||
name: "Upload to Xray" | ||
runs-on: [ledger-live-medium] | ||
env: | ||
XRAY_CLIENT_ID: ${{ secrets.XRAY_CLIENT_ID }} | ||
XRAY_CLIENT_SECRET: ${{ secrets.XRAY_CLIENT_SECRET }} | ||
XRAY_API_URL: https://xray.cloud.getxray.app/api/v2 | ||
JIRA_URL: https://ledgerhq.atlassian.net/browse | ||
needs: e2e-tests-linux | ||
if: ${{ !cancelled() && inputs.export_to_xray }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ inputs.ref || github.sha }} | ||
|
||
- name: Download Xray Results | ||
uses: actions/[email protected] | ||
with: | ||
path: "apps/ledger-live-desktop/artifacts/xray" | ||
pattern: xray-reports-* | ||
merge-multiple: false | ||
|
||
- name: Extract and Aggregate Xray results | ||
run: | ||
./aggregate-xray-reports.sh | ||
|
||
- name: Upload aggregated xray results | ||
uses: actions/[email protected] | ||
with: | ||
name: aggregated-xray-reports | ||
path: "apps/ledger-live-desktop/artifacts/xray/aggregated-xray-reports.json" | ||
|
||
- name: Authenticate to Xray | ||
id: authenticate | ||
run: | | ||
response=$(curl -H "Content-Type: application/json" -X POST --data '{"client_id": "${{ secrets.XRAY_CLIENT_ID }}", "client_secret": "${{ secrets.XRAY_CLIENT_SECRET }}"}' ${{ env.XRAY_API_URL }}/authenticate) | ||
echo "xray_token=$response" >> $GITHUB_OUTPUT | ||
- name: Publish merged report on Xray | ||
id: publish-xray | ||
run: | | ||
response=$(curl -H "Content-Type: application/json" \ | ||
-H "Authorization: Bearer ${{ steps.authenticate.outputs.xray_token }}" \ | ||
-X POST \ | ||
--data @apps/ledger-live-desktop/artifacts/xray/aggregated-xray-reports.json \ | ||
${{ env.XRAY_API_URL }}/import/execution) | ||
key=$(echo $response | jq -r '.key') | ||
echo "xray_key=$key" >> $GITHUB_OUTPUT | ||
- name: Write Xray report in summary | ||
shell: bash | ||
run: echo "::notice title=Xray report URL::${{ env.JIRA_URL }}/${{ steps.publish-xray.outputs.xray_key }}" |
Validating CODEOWNERS rules …
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
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
Oops, something went wrong.