devops: migrate from master to main branch (#10303)

This commit is contained in:
Max Schmitt 2021-12-07 22:58:33 -08:00 committed by GitHub
parent fdb633dc8b
commit 5ba7903ba0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 35 additions and 35 deletions

View file

@ -3,11 +3,11 @@ name: "infra"
on: on:
push: push:
branches: branches:
- master - main
- release-* - release-*
pull_request: pull_request:
branches: branches:
- master - main
- release-* - release-*
jobs: jobs:

View file

@ -2,7 +2,7 @@ name: "Check client side changes"
on: on:
push: push:
branches: branches:
- master - main
paths: paths:
- 'packages/playwright-core/src/client/**/*' - 'packages/playwright-core/src/client/**/*'
jobs: jobs:

View file

@ -24,14 +24,14 @@ jobs:
- run: npm run build - run: npm run build
- run: npx playwright install-deps - run: npx playwright install-deps
- name: "@next: publish with commit timestamp (triggered manually)" - name: "@next: publish with commit timestamp (triggered manually)"
if: contains(github.ref, 'master') && github.event_name == 'workflow_dispatch' if: contains(github.ref, 'main') && github.event_name == 'workflow_dispatch'
run: | run: |
node utils/build/update_canary_version.js --alpha --commit-timestamp node utils/build/update_canary_version.js --alpha --commit-timestamp
utils/publish_all_packages.sh --alpha utils/publish_all_packages.sh --alpha
env: env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: "@next: publish with today's date (triggered automatically)" - name: "@next: publish with today's date (triggered automatically)"
if: contains(github.ref, 'master') && github.event_name != 'workflow_dispatch' if: contains(github.ref, 'main') && github.event_name != 'workflow_dispatch'
run: | run: |
node utils/build/update_canary_version.js --alpha --today-date node utils/build/update_canary_version.js --alpha --today-date
utils/publish_all_packages.sh --alpha utils/publish_all_packages.sh --alpha
@ -76,7 +76,7 @@ jobs:
- run: npm i -g npm@7 - run: npm i -g npm@7
- name: Deploy Canary - name: Deploy Canary
run: bash utils/build/deploy-trace-viewer.sh --canary run: bash utils/build/deploy-trace-viewer.sh --canary
if: contains(github.ref, 'master') if: contains(github.ref, 'main')
env: env:
GH_SERVICE_ACCOUNT_TOKEN: ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }} GH_SERVICE_ACCOUNT_TOKEN: ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }}
- name: Deploy BETA - name: Deploy BETA

View file

@ -41,6 +41,6 @@ jobs:
owner: 'microsoft', owner: 'microsoft',
repo: 'playwright', repo: 'playwright',
head: 'microsoft:${{ steps.prepare-branch.outputs.BRANCH_NAME }}', head: 'microsoft:${{ steps.prepare-branch.outputs.BRANCH_NAME }}',
base: 'master', base: 'main',
title: 'feat(${{ github.event.client_payload.browser }}): roll to r${{ github.event.client_payload.revision }}', title: 'feat(${{ github.event.client_payload.browser }}): roll to r${{ github.event.client_payload.revision }}',
}); });

View file

@ -41,7 +41,7 @@ jobs:
owner: 'microsoft', owner: 'microsoft',
repo: 'playwright', repo: 'playwright',
head: 'microsoft:${{ steps.prepare-branch.outputs.BRANCH_NAME }}', head: 'microsoft:${{ steps.prepare-branch.outputs.BRANCH_NAME }}',
base: 'master', base: 'main',
title: 'browser(chromium): roll to r${{ steps.bump-chromium.outputs.BASE_POSITION }}', title: 'browser(chromium): roll to r${{ steps.bump-chromium.outputs.BASE_POSITION }}',
body: 'Upstream commit: https://github.com/chromium/chromium/commit/${{ steps.bump-chromium.outputs.GIT_COMMIT }}', body: 'Upstream commit: https://github.com/chromium/chromium/commit/${{ steps.bump-chromium.outputs.GIT_COMMIT }}',
}); });

View file

@ -3,7 +3,7 @@ name: "Docker tests"
on: on:
push: push:
branches: branches:
- master - main
- release-* - release-*
pull_request: pull_request:
paths: paths:
@ -12,7 +12,7 @@ on:
- 'browsers.json' - 'browsers.json'
- 'package.json' - 'package.json'
branches: branches:
- master - main
- release-* - release-*
env: env:

View file

@ -3,7 +3,7 @@ name: "tests 3"
on: on:
push: push:
branches: branches:
- master - main
- release-* - release-*
env: env:

View file

@ -3,14 +3,14 @@ name: "tests 1"
on: on:
push: push:
branches: branches:
- master - main
- release-* - release-*
pull_request: pull_request:
paths-ignore: paths-ignore:
- 'browser_patches/**' - 'browser_patches/**'
- 'docs/**' - 'docs/**'
branches: branches:
- master - main
- release-* - release-*
env: env:

View file

@ -3,7 +3,7 @@ name: "tests 2"
on: on:
push: push:
branches: branches:
- master - main
- release-* - release-*
pull_request: pull_request:
paths-ignore: paths-ignore:
@ -11,7 +11,7 @@ on:
- 'docs/**' - 'docs/**'
types: [ labeled ] types: [ labeled ]
branches: branches:
- master - main
- release-* - release-*
env: env:

View file

@ -6,10 +6,10 @@ on:
ref: ref:
description: 'Playwright SHA / ref to build Chromium' description: 'Playwright SHA / ref to build Chromium'
required: true required: true
default: 'master' default: 'main'
push: push:
branches: branches:
- master - main
- release-* - release-*
paths: paths:
- browser_patches/chromium/BUILD_NUMBER - browser_patches/chromium/BUILD_NUMBER

View file

@ -7,7 +7,7 @@ on:
ref: ref:
description: 'Playwright SHA / ref to build Chromium With Symbols' description: 'Playwright SHA / ref to build Chromium With Symbols'
required: true required: true
default: 'master' default: 'main'
release: release:
types: [published] types: [published]
push: push:

View file

@ -3,7 +3,7 @@ name: "Deprecated WebKit Mac 10.14 Builder"
on: on:
push: push:
branches: branches:
- master - main
- release-* - release-*
paths: paths:
- browser_patches/depcrecated-webkit-mac-10.14/BUILD_NUMBER - browser_patches/depcrecated-webkit-mac-10.14/BUILD_NUMBER

View file

@ -3,7 +3,7 @@ name: "FFMPEG Builder"
on: on:
push: push:
branches: branches:
- master - main
- release-* - release-*
paths: paths:
- browser_patches/ffmpeg/BUILD_NUMBER - browser_patches/ffmpeg/BUILD_NUMBER

View file

@ -3,7 +3,7 @@ name: "Firefox Builder"
on: on:
push: push:
branches: branches:
- master - main
- release-* - release-*
paths: paths:
- browser_patches/firefox/BUILD_NUMBER - browser_patches/firefox/BUILD_NUMBER

View file

@ -3,7 +3,7 @@ name: "Firefox Beta Builder"
on: on:
push: push:
branches: branches:
- master - main
- release-* - release-*
paths: paths:
- browser_patches/firefox-beta/BUILD_NUMBER - browser_patches/firefox-beta/BUILD_NUMBER

View file

@ -3,7 +3,7 @@ name: "WebKit Builder"
on: on:
push: push:
branches: branches:
- master - main
- release-* - release-*
paths: paths:
- browser_patches/webkit/BUILD_NUMBER - browser_patches/webkit/BUILD_NUMBER

View file

@ -3,7 +3,7 @@ name: "WinLDD Builder"
on: on:
push: push:
branches: branches:
- master - main
- release-* - release-*
paths: paths:
- browser_patches/winldd/BUILD_NUMBER - browser_patches/winldd/BUILD_NUMBER

View file

@ -3,7 +3,7 @@ name: "Internal Tests"
on: on:
push: push:
branches: branches:
- master - main
- release-* - release-*
jobs: jobs:

View file

@ -51,7 +51,7 @@ information on using pull requests.
### Code Style ### Code Style
- Coding style is fully defined in [.eslintrc](https://github.com/microsoft/playwright/blob/master/.eslintrc.js) - Coding style is fully defined in [.eslintrc](https://github.com/microsoft/playwright/blob/main/.eslintrc.js)
- Comments should be generally avoided. If the code would not be understood without comments, consider re-writing the code to make it self-explanatory. - Comments should be generally avoided. If the code would not be understood without comments, consider re-writing the code to make it self-explanatory.
To run code linter, use: To run code linter, use:
@ -106,7 +106,7 @@ Fixes #123, fixes #234
### Writing Documentation ### Writing Documentation
All API classes, methods, and events should have a description in [`docs/src`](https://github.com/microsoft/playwright/blob/master/docs/src). There's a [documentation linter](https://github.com/microsoft/playwright/tree/master/utils/doclint) which makes sure documentation is aligned with the codebase. All API classes, methods, and events should have a description in [`docs/src`](https://github.com/microsoft/playwright/blob/main/docs/src). There's a [documentation linter](https://github.com/microsoft/playwright/tree/main/utils/doclint) which makes sure documentation is aligned with the codebase.
To run the documentation linter, use: To run the documentation linter, use:
@ -130,7 +130,7 @@ A barrier for introducing new installation dependencies is especially high:
- Tests should be *hermetic*. Tests should not depend on external services. - Tests should be *hermetic*. Tests should not depend on external services.
- Tests should work on all three platforms: Mac, Linux and Win. This is especially important for screenshot tests. - Tests should work on all three platforms: Mac, Linux and Win. This is especially important for screenshot tests.
Playwright tests are located in [`tests`](https://github.com/microsoft/playwright/blob/master/tests) and use `@playwright/test` test runner. Playwright tests are located in [`tests`](https://github.com/microsoft/playwright/blob/main/tests) and use `@playwright/test` test runner.
These are integration tests, making sure public API methods and events work as expected. These are integration tests, making sure public API methods and events work as expected.
- To run all tests: - To run all tests:

View file

@ -3,7 +3,7 @@ Releasing is a 3-step process.
# 1. Create a release branch # 1. Create a release branch
1. On your local machine, create a new branch `release-X.Y` based off the "cutting" commit and land a `chore: mark vX.Y.Z` in the local branch: 1. On your local machine, create a new branch `release-X.Y` based off the "cutting" commit and land a `chore: mark vX.Y.Z` in the local branch:
- `git checkout master` - `git checkout main`
- `git checkout -b release-X.Y` - `git checkout -b release-X.Y`
- `./utils/update_version.js vX.Y` - `./utils/update_version.js vX.Y`
- `npm run doc` - `npm run doc`

View file

@ -74,7 +74,7 @@ steps:
run: pytest run: pytest
``` ```
We run [our tests](https://github.com/microsoft/playwright/blob/master/.github/workflows/tests_secondary.yml) on GitHub Actions, across a matrix of 3 platforms (Windows, Linux, macOS) and 3 browsers (Chromium, Firefox, WebKit). We run [our tests](https://github.com/microsoft/playwright/blob/main/.github/workflows/tests_secondary.yml) on GitHub Actions, across a matrix of 3 platforms (Windows, Linux, macOS) and 3 browsers (Chromium, Firefox, WebKit).
### GitHub Actions on deployment ### GitHub Actions on deployment

View file

@ -59,7 +59,7 @@ docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_prof
docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright/java:focal /bin/bash docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright/java:focal /bin/bash
``` ```
[`seccomp_profile.json`](https://github.com/microsoft/playwright/blob/master/utils/docker/seccomp_profile.json) is needed to run Chromium with sandbox. This is a [default Docker seccomp profile](https://github.com/docker/engine/blob/d0d99b04cf6e00ed3fc27e81fc3d94e7eda70af3/profiles/seccomp/default.json) with extra user namespace cloning permissions: [`seccomp_profile.json`](https://github.com/microsoft/playwright/blob/main/utils/docker/seccomp_profile.json) is needed to run Chromium with sandbox. This is a [default Docker seccomp profile](https://github.com/docker/engine/blob/d0d99b04cf6e00ed3fc27e81fc3d94e7eda70af3/profiles/seccomp/default.json) with extra user namespace cloning permissions:
```json ```json
[ [
@ -118,7 +118,7 @@ Browser builds for Firefox and WebKit are built for the [glibc](https://en.wikip
### Build the image ### Build the image
Use [`//utils/docker/build.sh`](https://github.com/microsoft/playwright/blob/master/utils/docker/build.sh) to build the image. Use [`//utils/docker/build.sh`](https://github.com/microsoft/playwright/blob/main/utils/docker/build.sh) to build the image.
``` ```
./utils/docker/build.sh focal playwright:localbuild-focal ./utils/docker/build.sh focal playwright:localbuild-focal

View file

@ -409,7 +409,7 @@ Learn more in the [documentation](./test-advanced#launching-a-development-web-se
#### Playwright Test #### Playwright Test
- **⚡️ Introducing [Reporter API](https://github.com/microsoft/playwright/blob/master/types/testReporter.d.ts)** which is already used to create an [Allure Playwright reporter](https://github.com/allure-framework/allure-js/pull/297). - **⚡️ Introducing [Reporter API](https://github.com/microsoft/playwright/blob/65a9037461ffc15d70cdc2055832a0c5512b227c/packages/playwright-test/types/testReporter.d.ts)** which is already used to create an [Allure Playwright reporter](https://github.com/allure-framework/allure-js/pull/297).
- **⛺️ New [`baseURL` fixture](./test-configuration#basic-options)** to support relative paths in tests. - **⛺️ New [`baseURL` fixture](./test-configuration#basic-options)** to support relative paths in tests.

View file

@ -129,7 +129,7 @@ export class Chromium extends BrowserType {
`Chromium sandboxing failed!`, `Chromium sandboxing failed!`,
`================================`, `================================`,
`To workaround sandboxing issues, do either of the following:`, `To workaround sandboxing issues, do either of the following:`,
` - (preferred): Configure environment to support sandboxing: https://github.com/microsoft/playwright/blob/master/docs/troubleshooting.md`, ` - (preferred): Configure environment to support sandboxing: https://playwright.dev/docs/troubleshooting`,
` - (alternative): Launch Chromium without sandbox using 'chromiumSandbox: false' option`, ` - (alternative): Launch Chromium without sandbox using 'chromiumSandbox: false' option`,
`================================`, `================================`,
``, ``,

View file

@ -32,7 +32,7 @@ if [[ ("${GITHUB_REPOSITORY}" != "microsoft/playwright") && ("${GITHUB_REPOSITOR
exit 0 exit 0
fi fi
if [[ "${GITHUB_REF}" != "refs/heads/master" && "${GITHUB_REF}" != 'refs/heads/release-'* ]]; then if [[ "${GITHUB_REF}" != "refs/heads/main" && "${GITHUB_REF}" != 'refs/heads/release-'* ]]; then
echo "NOTE: skipping dashboard uploading from Playwright branches" echo "NOTE: skipping dashboard uploading from Playwright branches"
exit 0 exit 0
fi fi