Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/module-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ jobs:
restore-keys: check-cache-${{ runner.os }}-
- name: Require versions, qualification evidence and complete release documentation
env:
OCTAMOD_PR_BASE: ${{ github.event.pull_request.base.sha }}
MODWERK_PAGES_RUN: ${{ needs.scope.outputs.pages-run }}
run: npm run check -- --base "$OCTAMOD_PR_BASE" --part contract
# The merge commit's base parent, as scope's: base.sha can be an older main, whose later changes would count as this PR's.
run: npm run check -- --base "$(git rev-parse HEAD^1)" --part contract
# Qualification records, complete docs/tutorials and monochrome screenshots are mandatory.
# First release: owner reviews actual evidence. Later releases: registered author
# verifies it and explicitly requests automatic publication within the trusted scope.
Expand Down Expand Up @@ -130,9 +130,9 @@ jobs:
check-cache-${{ runner.os }}-
- name: Run one suite of the check
env:
OCTAMOD_PR_BASE: ${{ github.event.pull_request.base.sha }}
PART: ${{ matrix.part }}
run: npm run check -- --base "$OCTAMOD_PR_BASE" --part "$PART"
# The merge commit's base parent, as scope's: base.sha can be an older main, whose later changes would count as this PR's.
run: npm run check -- --base "$(git rev-parse HEAD^1)" --part "$PART"
module-paths-windows:
needs: [scope, module-contract]
if: needs.scope.outputs.windows == 'true'
Expand All @@ -150,9 +150,9 @@ jobs:
- run: npm ci
- name: Validate module paths against the exact PR base
env:
OCTAMOD_PR_BASE: ${{ github.event.pull_request.base.sha }}
MODWERK_PAGES_RUN: ${{ needs.scope.outputs.pages-run }}
run: npm run modules:check -- --base "$env:OCTAMOD_PR_BASE"
# The merge commit's base parent, as scope's: base.sha can be an older main, whose later changes would count as this PR's.
run: npm run modules:check -- --base "$(git rev-parse HEAD^1)"
- name: Check byte-exact source integrity
run: npm run sdk:check
- name: Exercise paths and directory junctions on Windows
Expand Down
3 changes: 3 additions & 0 deletions scripts/pr-check-plan.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ it('starts the workflow’s scope command as a fresh Node process', () => {
expect(command).toBeTruthy()
// The base is the merge commit's parent, which the two-commit checkout holds; the event's base.sha may not be in it.
expect(workflow).toMatch(/- id: scope\n {8}env:\n(?: {10}#.*\n)* {10}OCTAMOD_PR_BASE: HEAD\^1\n/)
// Every later check compares against the same parent: none takes the event's base.sha.
expect(workflow).not.toMatch(/pull_request\.base\.sha \}\}\n/)
expect(workflow.match(/--base "\$\(git rev-parse HEAD\^1\)"/g)).toHaveLength(3)
const output = execFileSync(process.execPath, [command[1], '--base', 'HEAD', '--head', 'HEAD'], { cwd: root, encoding: 'utf8' })
expect(output.trim().split('\n')).toEqual([
'parts=["test:1/2","test:2/2","sdk"]', 'modules=false', 'windows=false', 'elemod=false', 'logger=false',
Expand Down
Loading