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: add workflow to roll new browser into PW (#8253)
Max Schmitte92924221a7a
diff --git a/.github/workflows/roll_browser_into_playwright.yml b/.github/workflows/roll_browser_into_playwright.ymlnew file mode 100644index 0000000000..4ac6a93ec3--- /dev/null+++ b/.github/workflows/roll_browser_into_playwright.yml@@ -0,0 +1,42 @@+name: Roll Browser into Playwright++on:+ repository_dispatch:+ types: [roll_into_pw]++jobs:+ roll:+ runs-on: ubuntu-20.04+ steps:+ - uses: actions/checkout@v2+ - uses: actions/setup-node@v2+ with:+ node-version: 14+ - run: npm ci+ - run: npm run build+ - name: Roll to new revision+ run: |+ ./utils/roll_browser.js ${{ github.event.client_payload.browser }} ${{ github.event.client_payload.revision }}+ - name: Prepare branch+ id: prepare-branch+ run: |+ BASE_POSITION="${{ steps.bump-chromium.outputs.BASE_POSITION }}"+ BRANCH_NAME="roll-${{ github.event.client_payload.browser }}/${{ github.event.client_payload.revision }}"+ echo "::set-output name=BRANCH_NAME::$BRANCH_NAME"+ git config --global user.name github-actions+ git config --global user.email 41898282+github-actions[bot]@users.noreply.github.com+ git checkout -b "$BRANCH_NAME"+ git add .+ git commit -m "feat(${{ github.event.client_payload.browser }}): roll to r${{ github.event.client_payload.revision }}"+ git push origin $BRANCH_NAME+ - name: Create Pull Request+ uses: actions/github-script@v4+ with:+ script: |+ await github.pulls.create({+ owner: 'microsoft',+ repo: 'playwright',+ head: 'microsoft:${{ steps.prepare-branch.outputs.BRANCH_NAME }}',+ base: 'master',+ title: 'feat(${{ github.event.client_payload.browser }}): roll to r${{ github.event.client_payload.revison }}',+ });diff --git a/browser_patches/checkout_build_archive_upload.sh b/browser_patches/checkout_build_archive_upload.shindex 8bd2018cb2..2c6a4bc985 100755--- a/browser_patches/checkout_build_archive_upload.sh+++ b/browser_patches/checkout_build_archive_upload.sh@@ -403,6 +403,14 @@ function generate_and_upload_browser_build {return 0}+function create_roll_into_playwright_pr {+ curl -X POST \+ -H "Accept: application/vnd.github.v3+json" \+ -H "Authorization: token ${GH_TOKEN}" \+ --data '{"event_type": "roll_into_pw", "client_payload": {"browser": "'"$1"'", "revision": "'"$1"'"}}' \+ https://api.github.com/repos/microsoft/playwright/dispatches+}+source ./send_telegram_message.shBUILD_ALIAS="$BUILD_FLAVOR r$BUILD_NUMBER"send_telegram_message "$BUILD_ALIAS -- started"@@ -427,6 +435,7 @@ if generate_and_upload_browser_build 2>&1 | ./sanitize_and_compress_log.js $LOG_done;LAST_COMMIT_MESSAGE=$(git log --format=%s -n 1 HEAD -- "./${BROWSER_NAME}/BUILD_NUMBER")send_telegram_message "<b>${BROWSER_DISPLAY_NAME} r${BUILD_NUMBER} COMPLETE! ✅</b> ${LAST_COMMIT_MESSAGE}"+ create_roll_into_playwright_pr $BROWSER_NAME $BUILD_NUMBER)elseRESULT_CODE="$?"