CI: improve flacky test reporting job execution time (#49665)
In this PR we use pre-build version of flaky jobs reporter, in order to speed up the job.
This commit is contained in:
parent
2e54b88c26
commit
b28ee008c6
|
@ -0,0 +1,7 @@
|
||||||
|
# Report Flaky Tests
|
||||||
|
|
||||||
|
A GitHub action to report flaky E2E tests to GitHub issues.
|
||||||
|
|
||||||
|
**This package is still experimental and breaking changes could be introduced in future minor versions (`v0.x`). Use it at your own risks.**
|
||||||
|
|
||||||
|
<br/><br/><p align="center"><img src="https://s.w.org/style/images/codeispoetry.png?1" alt="Code is Poetry." /></p>
|
|
@ -0,0 +1,17 @@
|
||||||
|
name: 'Report flaky tests'
|
||||||
|
description: 'Report flaky tests to GitHub issues'
|
||||||
|
inputs:
|
||||||
|
repo-token:
|
||||||
|
description: 'GitHub token'
|
||||||
|
required: true
|
||||||
|
label:
|
||||||
|
description: 'The flaky-test label name'
|
||||||
|
required: true
|
||||||
|
default: 'flaky-test'
|
||||||
|
artifact-path:
|
||||||
|
description: 'The path of the downloaded artifact'
|
||||||
|
required: true
|
||||||
|
default: 'flaky-tests'
|
||||||
|
runs:
|
||||||
|
using: 'node20'
|
||||||
|
main: 'dist/index.js'
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,41 @@
|
||||||
|
/*!
|
||||||
|
* fill-range <https://github.com/jonschlinkert/fill-range>
|
||||||
|
*
|
||||||
|
* Copyright (c) 2014-present, Jon Schlinkert.
|
||||||
|
* Licensed under the MIT License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* is-number <https://github.com/jonschlinkert/is-number>
|
||||||
|
*
|
||||||
|
* Copyright (c) 2014-present, Jon Schlinkert.
|
||||||
|
* Released under the MIT License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
||||||
|
*
|
||||||
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
||||||
|
* Released under the MIT License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* to-regex-range <https://github.com/micromatch/to-regex-range>
|
||||||
|
*
|
||||||
|
* Copyright (c) 2015-present, Jon Schlinkert.
|
||||||
|
* Released under the MIT License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
|
||||||
|
|
||||||
|
/*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @license React
|
||||||
|
* react-is.production.min.js
|
||||||
|
*
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
|
@ -338,37 +338,27 @@ jobs:
|
||||||
issues: write
|
issues: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: 'actions/checkout@v4'
|
||||||
with:
|
name: 'Checkout'
|
||||||
repository: WordPress/gutenberg
|
|
||||||
ref: dbf201449e9736f672b61e422787d47659db327a
|
|
||||||
|
|
||||||
- uses: actions/download-artifact@v4
|
- uses: 'actions/download-artifact@v4'
|
||||||
id: download-artifact
|
name: 'Download artifacts'
|
||||||
with:
|
with:
|
||||||
pattern: flaky-tests*
|
pattern: flaky-tests*
|
||||||
path: flaky-tests
|
path: flaky-tests
|
||||||
merge-multiple: true
|
merge-multiple: true
|
||||||
|
|
||||||
- name: 'Check if there are flaky tests reports'
|
- name: 'Merge flaky tests reports'
|
||||||
run: |
|
run: |
|
||||||
downloadPath='${{ steps.download-artifact.outputs.download-path }}'
|
downloadPath='${{ steps.download-artifact.outputs.download-path || './flaky-tests' }}'
|
||||||
# make dir so that next step doesn't fail if it doesn't exist
|
# make dir so that next step doesn't fail if it doesn't exist
|
||||||
mkdir -p $downloadPath
|
mkdir -p $downloadPath
|
||||||
# any output means there are reports
|
# any output means there are reports
|
||||||
echo "FLAKY_REPORTS=$(ls -A $downloadPath | head -1)" >> $GITHUB_ENV
|
echo "FLAKY_REPORTS=$(ls -A $downloadPath | head -1)" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: 'Setup'
|
|
||||||
if: ${{ !!env.FLAKY_REPORTS }}
|
|
||||||
uses: ./.github/setup-node
|
|
||||||
|
|
||||||
- name: 'Build packages'
|
|
||||||
if: ${{ !!env.FLAKY_REPORTS }}
|
|
||||||
run: npm run build:packages
|
|
||||||
|
|
||||||
- name: 'Report flaky tests'
|
- name: 'Report flaky tests'
|
||||||
if: ${{ !!env.FLAKY_REPORTS }}
|
if: ${{ !!env.FLAKY_REPORTS }}
|
||||||
uses: ./packages/report-flaky-tests
|
uses: './.github/actions/report-flaky-tests'
|
||||||
with:
|
with:
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
label: 'metric: flaky e2e test'
|
label: 'metric: flaky e2e test'
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
|
||||||
|
CI: improve flacky tests reporting job execution time.
|
Loading…
Reference in New Issue