Repository navigation
Docs' browser specs run here: on each pull request's own Worker, and on preview before prd #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
2cf1c08
Docs builds, tests, publishes and deploys from iterate/docs
mmkal 7022882
Docs' browser specs run here: on each pull request's own Worker, and …
mmkal 74c37c8
delete-pull-request forces the delete, as the Worker owns a Durable O…
mmkal 90c7895
Merge main into specs: main is #1's squash, which this branch already…
mmkal 36098c3
A closed pull request's Worker is deleted by main's code
mmkal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| name: Pull request closed | ||
|
|
||
| # A CLOSED PULL REQUEST'S DOCS WORKER, `docs-pr<N>` (specs.yml deployed it), deleted. Its own | ||
| # workflow, so no push to an open pull request carries it as a skipped job. Depot registers the | ||
| # `closed` trigger once this file is on the default branch. By hand: | ||
| # pnpm --dir packages/docs-app delete-pull-request --pr <N> | ||
| permissions: | ||
| contents: read | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: | ||
| - closed | ||
|
|
||
| concurrency: | ||
| # waits for the pull request's specs run to settle instead of deleting its Worker from under it | ||
| group: specs-${{ github.event.pull_request.number }} | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| delete: | ||
| name: Delete the pull request's Docs | ||
| runs-on: depot-ubuntu-24.04 | ||
| timeout-minutes: 10 | ||
| steps: | ||
| # main's code, not the pull request's: a head whose install broke still gets its Worker | ||
| # deleted, and none of its code runs with the Doppler token | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: main | ||
| persist-credentials: false | ||
| - name: Setup | ||
| uses: ./.depot/actions/setup | ||
| - name: Delete | ||
| env: | ||
| DOPPLER_TOKEN: ${{ secrets.DOPPLER_TOKEN }} | ||
| run: pnpm --dir packages/docs-app delete-pull-request --pr ${{ github.event.pull_request.number }} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| name: Specs | ||
|
|
||
| # A PULL REQUEST'S DOCS UNDER ITS BROWSER SPECS (test/playwright/docs): its head deployed as a Worker | ||
| # of its own on the dev/preview account (`docs-pr<N>`, envs.ts `pullRequestEnv`), served through | ||
| # fixture projects on main on dev's platform (os.iterate-dev-preview.workers.dev), each installing | ||
| # the head's @iterate-com/docs from pkg.pr.new (.github/workflows/pkg-pr-new.yml, which the specs | ||
| # wait for). The Worker is deleted when the pull request closes (pull-request-closed.yml). Main's | ||
| # specs run in deploy.yml, against `preview`, before prd. | ||
| permissions: | ||
| contents: read | ||
|
|
||
| on: | ||
| pull_request: | ||
|
|
||
| concurrency: | ||
| group: specs-${{ github.event.pull_request.number || github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| specs: | ||
| name: Browser specs | ||
| # six browsers at once (test/playwright.config.ts `workers`) | ||
| runs-on: depot-ubuntu-24.04-4 | ||
| timeout-minutes: 30 | ||
| env: | ||
| # the head pkg.pr.new published, not the merge commit a pull request's run checks out | ||
| PUBLISHED_PACKAGE_COMMIT: ${{ github.event.pull_request.head.sha }} | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| persist-credentials: false | ||
| ref: ${{ github.event.pull_request.head.sha }} | ||
| - name: Setup | ||
| uses: ./.depot/actions/setup | ||
| - name: Browser | ||
| run: pnpm --dir test exec playwright install --only-shell chromium | ||
| - name: Deploy the pull request's Docs | ||
| env: | ||
| DOPPLER_TOKEN: ${{ secrets.DOPPLER_TOKEN }} | ||
| run: pnpm --dir packages/docs-app run-script deploy --env pr${{ github.event.pull_request.number }} | ||
| - name: Specs | ||
| env: | ||
| DOPPLER_TOKEN: ${{ secrets.DOPPLER_TOKEN }} | ||
| WORKER_BASE_URL: https://os.iterate-dev-preview.workers.dev | ||
| DOCS_BASE_URL: https://docs-pr${{ github.event.pull_request.number }}.iterate-dev-preview.workers.dev | ||
| run: doppler run --project os --config preview -- pnpm spec | ||
| - name: Upload the report | ||
| if: ${{ failure() }} | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: playwright-report | ||
| path: test-results/ | ||
| retention-days: 14 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.