Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
devops: better upload flakiness dashboard upload script (#6176)
Andrey Lushnikov2c34eaeaf97d
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.ymlindex b1151a7f17..7f17ffb05a 100644--- a/.github/workflows/tests.yml+++ b/.github/workflows/tests.yml@@ -41,7 +41,7 @@ jobs:- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- bash -c "ulimit -c unlimited && npm run test -- --tag=${{ matrix.browser }}"- run: node tests/config/checkCoverage.js ${{ matrix.browser }}- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json- if: always() && github.repository == 'microsoft/playwright' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-'))+ if: always()- uses: actions/upload-artifact@v1if: always()with:@@ -66,7 +66,7 @@ jobs:- run: node lib/cli/cli install-deps ${{ matrix.browser }} chromium- run: npm run test -- --tag=${{ matrix.browser }}- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json- if: always() && github.repository == 'microsoft/playwright' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-'))+ if: always()- uses: actions/upload-artifact@v1if: ${{ always() }}with:@@ -94,7 +94,7 @@ jobs:- run: npm run test -- --tag=${{ matrix.browser }}shell: bash- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json- if: always() && github.repository == 'microsoft/playwright' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-'))+ if: always()shell: bash- uses: actions/upload-artifact@v1if: ${{ always() }}@@ -147,7 +147,7 @@ jobs:env:HEADFUL: 1- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json- if: always() && github.repository == 'microsoft/playwright' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-'))+ if: always()- uses: actions/upload-artifact@v1if: ${{ always() }}with:@@ -179,7 +179,7 @@ jobs:env:PWTEST_MODE: "${{ matrix.mode }}"- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json- if: always() && github.repository == 'microsoft/playwright' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-'))+ if: always()- uses: actions/upload-artifact@v1if: ${{ always() }}with:@@ -211,7 +211,7 @@ jobs:env:PWTEST_VIDEO: 1- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json- if: always() && github.repository == 'microsoft/playwright' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-'))+ if: always()- uses: actions/upload-artifact@v1if: ${{ always() }}with:@@ -240,7 +240,7 @@ jobs:- name: Run testsrun: npm run atest -- --shard=${{ matrix.shard }}/2- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json- if: always() && github.repository == 'microsoft/playwright' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-'))+ if: always()- uses: actions/upload-artifact@v1if: ${{ always() }}with:@@ -274,7 +274,7 @@ jobs:env:PWTEST_CHANNEL: "chrome"- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json- if: always() && github.repository == 'microsoft/playwright' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-'))+ if: always()- uses: actions/upload-artifact@v1if: ${{ always() }}with:@@ -303,7 +303,7 @@ jobs:env:PWTEST_CHANNEL: "chrome"- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json- if: always() && github.repository == 'microsoft/playwright' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-'))+ if: always()shell: bash- uses: actions/upload-artifact@v1if: ${{ always() }}@@ -329,7 +329,7 @@ jobs:env:PWTEST_CHANNEL: "chrome"- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json- if: always() && github.repository == 'microsoft/playwright' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-'))+ if: always()- uses: actions/upload-artifact@v1if: ${{ always() }}with:@@ -383,7 +383,7 @@ jobs:- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- bash -c "ulimit -c unlimited && npm run etest"- run: node tests/config/checkCoverage.js electron- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json- if: always() && github.repository == 'microsoft/playwright' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-'))+ if: always()- uses: actions/upload-artifact@v1if: ${{ always() }}with:diff --git a/utils/upload_flakiness_dashboard.sh b/utils/upload_flakiness_dashboard.shindex e522431c4b..caab4cfa37 100755--- a/utils/upload_flakiness_dashboard.sh+++ b/utils/upload_flakiness_dashboard.sh@@ -27,6 +27,16 @@ if [[ ($1 == '--help') || ($1 == '-h') ]]; thenexit 0fi+if [[ ("${GITHUB_REPOSITORY}" != "microsoft/playwright") && ("${GITHUB_REPOSITORY}" != "microsoft/playwright-internal") ]]; then+ echo "NOTE: skipping dashboard uploading from fork"+ exit 0+fi++if [[ "${GITHUB_REF}" != "refs/heads/master" && "${GITHUB_REF}" != 'refs/heads/release-'* ]]; then+ echo "NOTE: skipping dashboard uploading from Playwright branches"+ exit 0+fi+if [[ -z "${FLAKINESS_CONNECTION_STRING}" ]]; thenecho "ERROR: \$FLAKINESS_CONNECTION_STRING environment variable is missing."echo " 'Azure Account Name' and 'Azure Account Key' secrets are required"