chore: extract batch download action (#23410)
This commit is contained in:
parent
40581ed906
commit
90aa378e8f
23
.github/actions/download-blob-report-from-azure/action.yml
vendored
Normal file
23
.github/actions/download-blob-report-from-azure/action.yml
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
name: 'Download blob report from Azure'
|
||||||
|
description: 'Download blob report from Azure blob storage'
|
||||||
|
inputs:
|
||||||
|
run_dir:
|
||||||
|
description: 'Name of the Azure blob storage directory containing blob report'
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
connection_string:
|
||||||
|
description: 'Azure connection string'
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- name: Download blob report from Azure
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
mkdir -p ${{ inputs.run_dir }}
|
||||||
|
LIST=$(az storage blob list -c '$web' --prefix ${{ inputs.run_dir }} --connection-string "${{ inputs.connection_string }}")
|
||||||
|
for name in $(echo $LIST | jq --raw-output '.[].name | select(test(".jsonl$"))');
|
||||||
|
do
|
||||||
|
az storage blob download -c '$web' --name $name -f $name --connection-string "${{ inputs.connection_string }}"
|
||||||
|
done
|
||||||
32
.github/workflows/tests_primary.yml
vendored
32
.github/workflows/tests_primary.yml
vendored
|
|
@ -82,19 +82,15 @@ jobs:
|
||||||
DEBUG: pw:install
|
DEBUG: pw:install
|
||||||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
|
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
|
||||||
- run: npm run build
|
- run: npm run build
|
||||||
- name: Download Blob Reports from Azure Blob Storage
|
- name: Download blob report from Azure
|
||||||
run: |
|
uses: ./.github/actions/download-blob-report-from-azure
|
||||||
run_dir='run-${{ github.run_id }}-${{ github.sha }}-test_linux'
|
with:
|
||||||
mkdir -p $run_dir
|
run_dir: 'run-${{ github.run_id }}-${{ github.sha }}-test_linux'
|
||||||
LIST=$(az storage blob list -c '$web' --prefix $run_dir --connection-string "${{ secrets.AZURE_CONNECTION_STRING_FOR_BLOB_REPORT }}")
|
connection_string: '${{ secrets.AZURE_CONNECTION_STRING }}'
|
||||||
for name in $(echo $LIST | jq --raw-output '.[].name | select(test(".jsonl$"))');
|
|
||||||
do
|
|
||||||
az storage blob download -c '$web' --name $name -f $name --connection-string "${{ secrets.AZURE_CONNECTION_STRING_FOR_BLOB_REPORT }}"
|
|
||||||
done
|
|
||||||
- name: Merge into HTML Report
|
- name: Merge into HTML Report
|
||||||
run: |
|
run: |
|
||||||
npx playwright merge-reports --reporter html --attachments missing 'run-${{ github.run_id }}-${{ github.sha }}-test_linux'
|
npx playwright merge-reports --reporter html --attachments missing 'run-${{ github.run_id }}-${{ github.sha }}-test_linux'
|
||||||
- name: Upload HTML Report to Azure Blob Storage
|
- name: Upload HTML Report to Azure
|
||||||
run: |
|
run: |
|
||||||
az storage blob upload-batch -s playwright-report -d '$web/run-${{ github.run_id }}-${{ github.sha }}-test_linux' --connection-string "${{ secrets.AZURE_CONNECTION_STRING_FOR_BLOB_REPORT }}"
|
az storage blob upload-batch -s playwright-report -d '$web/run-${{ github.run_id }}-${{ github.sha }}-test_linux' --connection-string "${{ secrets.AZURE_CONNECTION_STRING_FOR_BLOB_REPORT }}"
|
||||||
echo "Report url: https://mspwblobreport.z1.web.core.windows.net/run-${{ github.run_id }}-${{ github.sha }}-test_linux/index.html"
|
echo "Report url: https://mspwblobreport.z1.web.core.windows.net/run-${{ github.run_id }}-${{ github.sha }}-test_linux/index.html"
|
||||||
|
|
@ -227,19 +223,15 @@ jobs:
|
||||||
DEBUG: pw:install
|
DEBUG: pw:install
|
||||||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
|
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
|
||||||
- run: npm run build
|
- run: npm run build
|
||||||
- name: Download Blob Reports from Azure Blob Storage
|
- name: Download blob report from Azure
|
||||||
run: |
|
uses: ./.github/actions/download-blob-report-from-azure
|
||||||
run_dir='run-${{ github.run_id }}-${{ github.sha }}-test_test_runner'
|
with:
|
||||||
mkdir -p $run_dir
|
run_dir: 'run-${{ github.run_id }}-${{ github.sha }}-test_test_runner'
|
||||||
LIST=$(az storage blob list -c '$web' --prefix $run_dir --connection-string "${{ secrets.AZURE_CONNECTION_STRING_FOR_BLOB_REPORT }}")
|
connection_string: '${{ secrets.AZURE_CONNECTION_STRING }}'
|
||||||
for name in $(echo $LIST | jq --raw-output '.[].name | select(test(".jsonl$"))');
|
|
||||||
do
|
|
||||||
az storage blob download -c '$web' --name $name -f $name --connection-string "${{ secrets.AZURE_CONNECTION_STRING_FOR_BLOB_REPORT }}"
|
|
||||||
done
|
|
||||||
- name: Merge into HTML Report
|
- name: Merge into HTML Report
|
||||||
run: |
|
run: |
|
||||||
npx playwright merge-reports --reporter html --attachments missing 'run-${{ github.run_id }}-${{ github.sha }}-test_test_runner'
|
npx playwright merge-reports --reporter html --attachments missing 'run-${{ github.run_id }}-${{ github.sha }}-test_test_runner'
|
||||||
- name: Upload HTML Report to Azure Blob Storage
|
- name: Upload HTML report to Azure
|
||||||
run: |
|
run: |
|
||||||
az storage blob upload-batch -s playwright-report -d '$web/run-${{ github.run_id }}-${{ github.sha }}-test_test_runner' --connection-string "${{ secrets.AZURE_CONNECTION_STRING_FOR_BLOB_REPORT }}"
|
az storage blob upload-batch -s playwright-report -d '$web/run-${{ github.run_id }}-${{ github.sha }}-test_test_runner' --connection-string "${{ secrets.AZURE_CONNECTION_STRING_FOR_BLOB_REPORT }}"
|
||||||
echo "Report url: https://mspwblobreport.z1.web.core.windows.net/run-${{ github.run_id }}-${{ github.sha }}-test_test_runner/index.html"
|
echo "Report url: https://mspwblobreport.z1.web.core.windows.net/run-${{ github.run_id }}-${{ github.sha }}-test_test_runner/index.html"
|
||||||
|
|
|
||||||
16
.github/workflows/tests_secondary.yml
vendored
16
.github/workflows/tests_secondary.yml
vendored
|
|
@ -229,19 +229,15 @@ jobs:
|
||||||
DEBUG: pw:install
|
DEBUG: pw:install
|
||||||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
|
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
|
||||||
- run: npm run build
|
- run: npm run build
|
||||||
- name: Download Blob Reports from Azure Blob Storage
|
- name: Download blob report from Azure
|
||||||
run: |
|
uses: ./.github/actions/download-blob-report-from-azure
|
||||||
run_dir='run-${{ github.run_id }}-${{ github.sha }}-tracing_linux'
|
with:
|
||||||
mkdir -p $run_dir
|
run_dir: 'run-${{ github.run_id }}-${{ github.sha }}-tracing_linux'
|
||||||
LIST=$(az storage blob list -c '$web' --prefix $run_dir --connection-string "${{ secrets.AZURE_CONNECTION_STRING_FOR_BLOB_REPORT }}")
|
connection_string: '${{ secrets.AZURE_CONNECTION_STRING }}'
|
||||||
for name in $(echo $LIST | jq --raw-output '.[].name | select(test(".jsonl$"))');
|
|
||||||
do
|
|
||||||
az storage blob download -c '$web' --name $name -f $name --connection-string "${{ secrets.AZURE_CONNECTION_STRING_FOR_BLOB_REPORT }}"
|
|
||||||
done
|
|
||||||
- name: Merge into HTML Report
|
- name: Merge into HTML Report
|
||||||
run: |
|
run: |
|
||||||
npx playwright merge-reports --reporter html --attachments missing 'run-${{ github.run_id }}-${{ github.sha }}-tracing_linux'
|
npx playwright merge-reports --reporter html --attachments missing 'run-${{ github.run_id }}-${{ github.sha }}-tracing_linux'
|
||||||
- name: Upload HTML Report to Azure Blob Storage
|
- name: Upload HTML report to Azure
|
||||||
run: |
|
run: |
|
||||||
az storage blob upload-batch -s playwright-report -d '$web/run-${{ github.run_id }}-${{ github.sha }}-tracing_linux' --connection-string "${{ secrets.AZURE_CONNECTION_STRING_FOR_BLOB_REPORT }}"
|
az storage blob upload-batch -s playwright-report -d '$web/run-${{ github.run_id }}-${{ github.sha }}-tracing_linux' --connection-string "${{ secrets.AZURE_CONNECTION_STRING_FOR_BLOB_REPORT }}"
|
||||||
echo "Report url: https://mspwblobreport.z1.web.core.windows.net/run-${{ github.run_id }}-${{ github.sha }}-tracing_linux/index.html"
|
echo "Report url: https://mspwblobreport.z1.web.core.windows.net/run-${{ github.run_id }}-${{ github.sha }}-tracing_linux/index.html"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue