mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
devops: always create blob report on CI, write PR number within action (#24241)
This commit is contained in:
parent
41643d070f
commit
d92db9a513
12
.github/actions/upload-blob-report/action.yml
vendored
12
.github/actions/upload-blob-report/action.yml
vendored
@ -25,4 +25,14 @@ runs:
|
|||||||
with:
|
with:
|
||||||
name: blob-report-${{ github.run_attempt }}
|
name: blob-report-${{ github.run_attempt }}
|
||||||
path: ${{ inputs.report_dir }}
|
path: ${{ inputs.report_dir }}
|
||||||
retention-days: 30
|
retention-days: 30
|
||||||
|
- name: Write triggering pull request number in a file
|
||||||
|
if: always() && github.event_name == 'pull_request'
|
||||||
|
shell: bash
|
||||||
|
run: echo '${{ github.event.number }}' > pull_request_number.txt;
|
||||||
|
- name: Upload artifact with the pull request number
|
||||||
|
if: always() && github.event_name == 'pull_request'
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: pull-request
|
||||||
|
path: pull_request_number.txt
|
||||||
|
|||||||
18
.github/workflows/tests_primary.yml
vendored
18
.github/workflows/tests_primary.yml
vendored
@ -55,7 +55,6 @@ jobs:
|
|||||||
- run: npx playwright install --with-deps ${{ matrix.browser }} chromium
|
- run: npx playwright install --with-deps ${{ matrix.browser }} chromium
|
||||||
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run test -- --project=${{ matrix.browser }}
|
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run test -- --project=${{ matrix.browser }}
|
||||||
env:
|
env:
|
||||||
PWTEST_BLOB_REPORT: 1
|
|
||||||
PWTEST_BLOB_SUFFIX: "-${{ matrix.os }}-node${{ matrix.node-version }}"
|
PWTEST_BLOB_SUFFIX: "-${{ matrix.os }}-node${{ matrix.node-version }}"
|
||||||
- run: node tests/config/checkCoverage.js ${{ matrix.browser }}
|
- run: node tests/config/checkCoverage.js ${{ matrix.browser }}
|
||||||
- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json
|
- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json
|
||||||
@ -89,7 +88,6 @@ jobs:
|
|||||||
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run test -- --project=chromium
|
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run test -- --project=chromium
|
||||||
env:
|
env:
|
||||||
PWTEST_CHANNEL: chromium-tip-of-tree
|
PWTEST_CHANNEL: chromium-tip-of-tree
|
||||||
PWTEST_BLOB_REPORT: 1
|
|
||||||
PWTEST_BLOB_SUFFIX: "-${{ matrix.os }}-chromium-tip-of-tree"
|
PWTEST_BLOB_SUFFIX: "-${{ matrix.os }}-chromium-tip-of-tree"
|
||||||
- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json
|
- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json
|
||||||
if: always()
|
if: always()
|
||||||
@ -129,12 +127,10 @@ jobs:
|
|||||||
- run: npx playwright install --with-deps
|
- run: npx playwright install --with-deps
|
||||||
- run: npm run ttest -- --shard ${{ matrix.shard }}
|
- run: npm run ttest -- --shard ${{ matrix.shard }}
|
||||||
env:
|
env:
|
||||||
PWTEST_BLOB_REPORT: 1
|
|
||||||
PWTEST_BLOB_SUFFIX: "-${{ matrix.os }}-node${{ matrix.node-version }}"
|
PWTEST_BLOB_SUFFIX: "-${{ matrix.os }}-node${{ matrix.node-version }}"
|
||||||
if: matrix.os != 'ubuntu-latest'
|
if: matrix.os != 'ubuntu-latest'
|
||||||
- run: xvfb-run npm run ttest -- --shard ${{ matrix.shard }}
|
- run: xvfb-run npm run ttest -- --shard ${{ matrix.shard }}
|
||||||
env:
|
env:
|
||||||
PWTEST_BLOB_REPORT: 1
|
|
||||||
PWTEST_BLOB_SUFFIX: "-${{ matrix.os }}-node${{ matrix.node-version }}"
|
PWTEST_BLOB_SUFFIX: "-${{ matrix.os }}-node${{ matrix.node-version }}"
|
||||||
if: matrix.os == 'ubuntu-latest'
|
if: matrix.os == 'ubuntu-latest'
|
||||||
- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json
|
- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json
|
||||||
@ -220,17 +216,3 @@ jobs:
|
|||||||
- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json
|
- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json
|
||||||
if: always()
|
if: always()
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
write-pull-request-number:
|
|
||||||
name: Write PR number
|
|
||||||
if: github.event_name == 'pull_request'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Write triggering pull request number in a file
|
|
||||||
shell: bash
|
|
||||||
run: echo '${{ github.event.number }}' > pull_request_number.txt;
|
|
||||||
- name: Upload artifact with the pull request number
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: pull-request
|
|
||||||
path: pull_request_number.txt
|
|
||||||
15
.github/workflows/tests_secondary.yml
vendored
15
.github/workflows/tests_secondary.yml
vendored
@ -203,7 +203,6 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
PWTEST_TRACE: 1
|
PWTEST_TRACE: 1
|
||||||
PWTEST_CHANNEL: ${{ matrix.channel }}
|
PWTEST_CHANNEL: ${{ matrix.channel }}
|
||||||
PWTEST_BLOB_REPORT: 1
|
|
||||||
PWTEST_BLOB_SUFFIX: ${{ (matrix.channel && format('-{0}', matrix.channel)) || '' }}
|
PWTEST_BLOB_SUFFIX: ${{ (matrix.channel && format('-{0}', matrix.channel)) || '' }}
|
||||||
- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json
|
- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json
|
||||||
if: always()
|
if: always()
|
||||||
@ -673,17 +672,3 @@ jobs:
|
|||||||
- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json
|
- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json
|
||||||
if: always()
|
if: always()
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
write-pull-request-number:
|
|
||||||
name: Write PR number
|
|
||||||
if: github.event_name == 'pull_request'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Write triggering pull request number in a file
|
|
||||||
shell: bash
|
|
||||||
run: echo '${{ github.event.number }}' > pull_request_number.txt;
|
|
||||||
- name: Upload artifact with the pull request number
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: pull-request
|
|
||||||
path: pull_request_number.txt
|
|
||||||
@ -46,11 +46,10 @@ const reporters = () => {
|
|||||||
const result: ReporterDescription[] = process.env.CI ? [
|
const result: ReporterDescription[] = process.env.CI ? [
|
||||||
['dot'],
|
['dot'],
|
||||||
['json', { outputFile: path.join(outputDir, 'report.json') }],
|
['json', { outputFile: path.join(outputDir, 'report.json') }],
|
||||||
|
['blob', { outputDir: path.join(outputDir, 'blob-report') }],
|
||||||
] : [
|
] : [
|
||||||
['html', { open: 'on-failure' }]
|
['html', { open: 'on-failure' }]
|
||||||
];
|
];
|
||||||
if (process.env.PWTEST_BLOB_REPORT === '1')
|
|
||||||
result.push(['blob', { outputDir: path.join(outputDir, 'blob-report') }]);
|
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
const config: Config<CoverageWorkerOptions & PlaywrightWorkerOptions & PlaywrightTestOptions & TestModeWorkerOptions> = {
|
const config: Config<CoverageWorkerOptions & PlaywrightWorkerOptions & PlaywrightTestOptions & TestModeWorkerOptions> = {
|
||||||
|
|||||||
@ -25,11 +25,10 @@ const reporters = () => {
|
|||||||
const result: ReporterDescription[] = process.env.CI ? [
|
const result: ReporterDescription[] = process.env.CI ? [
|
||||||
['dot'],
|
['dot'],
|
||||||
['json', { outputFile: path.join(outputDir, 'report.json') }],
|
['json', { outputFile: path.join(outputDir, 'report.json') }],
|
||||||
|
['blob', { outputDir: path.join(outputDir, 'blob-report') }],
|
||||||
] : [
|
] : [
|
||||||
['list']
|
['list']
|
||||||
];
|
];
|
||||||
if (process.env.PWTEST_BLOB_REPORT === '1')
|
|
||||||
result.push(['blob', { outputDir: path.join(outputDir, 'blob-report') }]);
|
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user