Repository navigation
Publish acceptance-tested screenshots for the website #1924
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
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
2baa575
Publish tested Cucumber screenshot evidence
stefan-burke 398302f
Address CodeRabbit review feedback
stefan-burke 42c22b3
Address CodeRabbit and Codex review feedback
stefan-burke 2a1b439
Add capturePreparedPage tests and reset N+1 guard after capture
stefan-burke 3b91226
Merge remote-tracking branch 'origin/main' into feature/cucumber-scre…
stefan-burke 05788b5
Harden Cucumber evidence capture
stefan-burke aa9e9d1
Remove stray test fixture
stefan-burke 3952d74
Complete evidence capture contracts
stefan-burke e535744
Strengthen screenshot browser contracts
stefan-burke 1bbfe98
Merge origin/main into feature/cucumber-screenshot-evidence
stefan-burke 6954f37
Keep evidence capture N+1 checks isolated
stefan-burke 622fa4a
Tighten evidence manifest and server contracts
stefan-burke 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| name: Specification evidence | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: [main] | ||
| schedule: | ||
| - cron: "23 4 1 * *" | ||
| workflow_dispatch: | ||
|
|
||
| env: | ||
| STRIPE_MOCK_VERSION: "0.188.0" | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: specification-evidence-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| evidence: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Set up Deno | ||
| uses: ./.github/actions/setup-deno | ||
|
|
||
| - name: Cache stripe-mock | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: .bin | ||
| key: stripe-mock-${{ env.STRIPE_MOCK_VERSION }}-linux-amd64 | ||
|
|
||
| - name: Resolve Playwright version | ||
| id: playwright | ||
| run: | | ||
| version="$(deno eval ' | ||
| const config = JSON.parse(await Deno.readTextFile("deno.json")); | ||
| const version = config.imports.playwright.match(/^npm:playwright@(.+)$/)?.[1]; | ||
| if (!version) throw new Error("playwright must be pinned in deno.json"); | ||
| console.log(version); | ||
| ')" | ||
| echo "version=$version" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Cache Playwright Chromium | ||
| id: chromium-cache | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.cache/ms-playwright | ||
| key: playwright-${{ runner.os }}-${{ steps.playwright.outputs.version }} | ||
|
|
||
| - name: Install Chromium and system dependencies | ||
| if: steps.chromium-cache.outputs.cache-hit != 'true' | ||
| run: deno run -A npm:playwright@${{ steps.playwright.outputs.version }} install --with-deps chromium | ||
|
|
||
| - name: Install Chromium system dependencies | ||
| if: steps.chromium-cache.outputs.cache-hit == 'true' | ||
| run: deno run -A npm:playwright@${{ steps.playwright.outputs.version }} install-deps chromium | ||
|
|
||
| - name: Test screenshot browser contracts | ||
| run: deno task test:screenshot-contract | ||
|
|
||
| - name: Capture specification evidence | ||
| run: deno task specs:evidence | ||
|
|
||
| - name: Upload specification evidence | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: tickets-evidence | ||
| path: reports/evidence | ||
| if-no-files-found: error | ||
| retention-days: 90 | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| const toHex = (bytes: ArrayBuffer): string => | ||
| [...new Uint8Array(bytes)] | ||
| .map((byte) => byte.toString(16).padStart(2, "0")) | ||
| .join(""); | ||
|
|
||
| export const sha256Hex = async (bytes: Uint8Array): Promise<string> => | ||
| toHex(await crypto.subtle.digest("SHA-256", Uint8Array.from(bytes))); |
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,8 @@ | ||
| #!/usr/bin/env -S deno run --allow-all | ||
| import { runEvidenceSpecs } from "./specs/evidence/run.ts"; | ||
| import { withTestHarness } from "./test-harness.ts"; | ||
|
|
||
| if (import.meta.main) { | ||
| const result = await withTestHarness(runEvidenceSpecs); | ||
| Deno.exit(result.success ? 0 : 1); | ||
| } |
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.