diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index bd80f76f..91999674 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -36,7 +36,10 @@ jobs: if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository runs-on: ubuntu-latest timeout-minutes: 10 - environment: yandex-e2e + # A pull request runs the branch's own runner, so its jobs wait in `yandex-e2e-pr` for a + # required reviewer; `yandex-e2e` takes `main` only. Both rules live in the repository + # settings, where a branch cannot edit them. + environment: ${{ github.event_name == 'pull_request' && 'yandex-e2e-pr' || 'yandex-e2e' }} env: YCLI_E2E_QUEUE: ${{ vars.YCLI_E2E_QUEUE || 'YCLIPAGE' }} steps: @@ -81,7 +84,7 @@ jobs: runs-on: ubuntu-latest # Tracker on three surfaces, with the pause below, ran 15 minutes (measured). timeout-minutes: 30 - environment: yandex-e2e + environment: ${{ github.event_name == 'pull_request' && 'yandex-e2e-pr' || 'yandex-e2e' }} env: YCLI_E2E: "1" YCLI_E2E_QUEUE: ${{ vars.YCLI_E2E_QUEUE || 'YCLIPAGE' }} diff --git a/e2e/README.md b/e2e/README.md index ef398846..96483029 100644 --- a/e2e/README.md +++ b/e2e/README.md @@ -152,4 +152,4 @@ Objects starting with `e2e-` but without a run stamp are reported and left alone ## CI -`.github/workflows/e2e.yml`: the smoke subset on pull requests from branches of this repository (forks get no secrets), every scenario nightly and on manual dispatch (optional `-k` input). A nightly or manual run is one job per service (`pytest e2e --service wiki`), side by side: no scenario reaches into another service, and within a service the scenarios run one after another. A `prepare` job goes first, once: it checks the token and removes what earlier runs left behind; each service job then removes only what it named itself. Runs are serialized by the `yandex-e2e` concurrency group and read their credentials from the `yandex-e2e` environment. The OAuth token is not refreshed in CI: when the preflight `ycli auth status` fails, reissue the token and update the secret. +`.github/workflows/e2e.yml`: the smoke subset on pull requests from branches of this repository (forks get no secrets), every scenario nightly and on manual dispatch (optional `-k` input). A nightly or manual run is one job per service (`pytest e2e --service wiki`), side by side: no scenario reaches into another service, and within a service the scenarios run one after another. A `prepare` job goes first, once: it checks the token and removes what earlier runs left behind; each service job then removes only what it named itself. Runs are serialized by the `yandex-e2e` concurrency group. A nightly or manual run reads its credentials from the `yandex-e2e` environment, which takes the `main` branch only; a pull request reads them from `yandex-e2e-pr`, where each run waits for a required reviewer, because it executes the branch's own runner. The OAuth token is not refreshed in CI: when the preflight `ycli auth status` fails, reissue the token and update the secret.