Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 21 additions & 30 deletions .github/actions/upload-flaky-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,38 +14,29 @@ runs:
shell: bash
# language=bash
run: |
FLAKES=""
SEP=""
for dir in $(find -type d -name 'surefire-reports*'); do
for i in $(grep -l -E '<flakyFailure|<flakyError' $dir/TEST-*.xml); do
FLAKES="$FLAKES$SEP$i"
SEP=$'\n'
done
done

if [ "$FLAKES" != "" ]; then
PR="${{ github.event.number }}"
JOB_NAME="${{ inputs.job-name }}"

MATRIX="${{ join(matrix.*, ' - ') }}"
if [ "$MATRIX" != "" ]; then
JOB_NAME="$JOB_NAME ($MATRIX)"
fi

JOB_URL=$(gh api repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs --paginate --jq ".jobs | map(select(.name == \"$JOB_NAME\")) | .[].html_url")

echo "job_name=$JOB_NAME" >> job-summary.properties
echo "job_url=$JOB_URL" >> job-summary.properties
if [ "$PR" != "" ]; then
echo "pr=$PR" >> job-summary.properties
echo "pr_url=https://github.com/${{ github.repository }}/pull/$PR" >> job-summary.properties
fi

echo "flakes<<EOF" >> $GITHUB_OUTPUT
echo "job-summary.properties" >> $GITHUB_OUTPUT
echo "$FLAKES" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT

PR="${{ github.event.number }}"
JOB_NAME="${{ inputs.job-name }}"

MATRIX="${{ join(matrix.*, ' - ') }}"
if [ "$MATRIX" != "" ]; then
JOB_NAME="$JOB_NAME ($MATRIX)"
fi

JOB_URL=$(gh api repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs --paginate --jq ".jobs | map(select(.name == \"$JOB_NAME\")) | .[].html_url")

echo "job_name=$JOB_NAME" >> job-summary.properties
echo "job_url=$JOB_URL" >> job-summary.properties
if [ "$PR" != "" ]; then
echo "pr=$PR" >> job-summary.properties
echo "pr_url=https://github.com/${{ github.repository }}/pull/$PR" >> job-summary.properties
fi

echo "flakes<<EOF" >> $GITHUB_OUTPUT
echo "job-summary.properties" >> $GITHUB_OUTPUT
echo "$FLAKES" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT

- uses: actions/upload-artifact@v4
if: ${{ steps.flaky-tests.outputs.flakes }}
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/js-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,14 @@ jobs:
path: js/apps/admin-ui/playwright-report
retention-days: 30

- name: Upload test reports
uses: actions/upload-artifact@v4
if: always()
with:
name: admin-ui-test-report-${{ matrix.browser }}
path: js/apps/admin-ui/test-results
retention-days: 30

- name: Upload server logs
if: always()
uses: actions/upload-artifact@v4
Expand Down
8 changes: 7 additions & 1 deletion js/apps/admin-ui/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@ export default defineConfig({
forbidOnly: !!process.env.CI,
retries: retryCount,
workers: 1,
reporter: process.env.CI ? [["github"], ["html"]] : "list",
reporter: process.env.CI
? [
["github"],
["html", { open: "never" }],
["junit", { outputFile: "playwright-report/results.xml" }],
]
: "list",

use: {
baseURL: "http://localhost:8080",
Expand Down
Loading