diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 111f306de589..ab1a3240762d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -77,7 +77,7 @@ jobs: - run: npm run test-integration e2e-mac: - if: github.repository_owner == 'facebook' + if: github.repository_owner == 'facebook' && github.event.review.state == 'APPROVED' strategy: matrix: node-version: [18.18.0] @@ -93,7 +93,7 @@ jobs: events-mode: ${{ matrix.events-mode }} e2e-linux: - if: github.repository_owner == 'facebook' + if: github.repository_owner == 'facebook' && github.event.review.state == 'APPROVED' strategy: matrix: node-version: [18.18.0] @@ -109,7 +109,7 @@ jobs: events-mode: ${{ matrix.events-mode }} e2e-windows: - if: github.repository_owner == 'facebook' + if: github.repository_owner == 'facebook' && (github.event.review.state == 'APPROVED' || contains(github.event.repository.collaborators, github.actor)) strategy: matrix: node-version: [18.18.0] @@ -125,7 +125,7 @@ jobs: events-mode: ${{ matrix.events-mode }} e2e-collab-mac: - if: github.repository_owner == 'facebook' + if: github.repository_owner == 'facebook' && github.event.review.state == 'APPROVED' strategy: matrix: node-version: [18.18.0] @@ -139,7 +139,7 @@ jobs: events-mode: 'modern-events' e2e-collab-linux: - if: github.repository_owner == 'facebook' + if: github.repository_owner == 'facebook' && github.event.review.state == 'APPROVED' strategy: matrix: node-version: [18.18.0] @@ -153,7 +153,7 @@ jobs: events-mode: 'modern-events' e2e-collab-windows: - if: github.repository_owner == 'facebook' + if: github.repository_owner == 'facebook' && github.event.review.state == 'APPROVED' strategy: matrix: node-version: [18.18.0] @@ -167,7 +167,7 @@ jobs: events-mode: 'modern-events' e2e-prod: - if: github.repository_owner == 'facebook' + if: github.repository_owner == 'facebook' && github.event.review.state == 'APPROVED' strategy: matrix: os: ['macos-latest'] @@ -185,7 +185,7 @@ jobs: events-mode: ${{ matrix.events-mode }} e2e-collab-prod: - if: github.repository_owner == 'facebook' + if: github.repository_owner == 'facebook' && github.event.review.state == 'APPROVED' strategy: matrix: os: ['macos-latest'] diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a79632b955a2..94159098f87d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,11 +8,19 @@ possible. We actively welcome your pull requests. 1. Fork the repo and create your branch from `main`. -2. If you've added code that should be tested, add tests. -3. If you've changed APIs, update the documentation. -4. Ensure the test suite passes. -5. Make sure your code lints. -6. If you haven't already, complete the Contributor License Agreement ("CLA"). +2. Run `npm install` to install dependencies. +3. If you've added code that should be tested, add tests. +4. If you've changed APIs, update the documentation. +5. Ensure the test suite passes. +6. Make sure your code lints. +7. If you haven't already, complete the Contributor License Agreement ("CLA"). + +Note that the local server needs to be running in order to run the e2e tests. + +- `npm run start` +- `npm run test-e2e-chromium` (to run only chromium e2e tests) + +`npm run start` will start both the dev server and collab server. If you don't need collab, use `npm run dev` to start just the dev server. ## Contributor License Agreement ("CLA") diff --git a/README.md b/README.md index ef70854c178f..40fb62ad864b 100644 --- a/README.md +++ b/README.md @@ -334,18 +334,7 @@ editor.registerUpdateListener(({editorState}) => { ## Contributing to Lexical -1. Clone this repository - -2. Install dependencies - - - `npm install` - -3. Start local server and run tests - - `npm run start` - - `npm run test-e2e-chromium` to run only chromium e2e tests - - The server needs to be running for the e2e tests - -`npm run start` will start both the dev server and collab server. If you don't need collab, use `npm run dev` to start just the dev server. +Please read the [CONTRIBUTING.md](https://github.com/facebook/lexical/blob/main/CONTRIBUTING.md). ### Optional but recommended, use VSCode for development