Skip to content

Commit

Permalink
chore(ci): in PR's emits both only 'affected' modules + the whole gra…
Browse files Browse the repository at this point in the history
…ph, with changed modules highlighted

instead of using 'focus' - the state-machine-cat graph is still small enough to warrant that
  • Loading branch information
sverweij committed Oct 23, 2022
1 parent aa687f4 commit c21fcc8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ jobs:
if: always() && matrix.node-version == env.NODE_LATEST && github.event_name == 'pull_request' && github.ref_name != github.event.repository.default_branch
run: |
npm run depcruise:github-actions:markdown
export SHA=${{github.event.pull_request.base.sha}} && npm run depcruise:github-actions:mermaid:affected
export SHA=${{github.event.pull_request.base.sha}} && npm run depcruise:github-actions:mermaid:diff
- name: test (on node != ${{env.NODE_LATEST}} only)
if: matrix.node-version != env.NODE_LATEST
Expand Down
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"depcruise:view-report": "wireit",
"depcruise:github-actions:markdown": "wireit",
"depcruise:github-actions:mermaid": "wireit",
"depcruise:github-actions:mermaid:affected": "wireit",
"depcruise:github-actions:mermaid:diff": "wireit",
"lint": "wireit",
"lint:eslint": "wireit",
Expand Down Expand Up @@ -272,8 +273,14 @@
"depcruise:json"
]
},
"depcruise:github-actions:mermaid:affected": {
"command": "echo '\n\n```mermaid' >> $GITHUB_STEP_SUMMARY && depcruise-fmt node_modules/.cache/depcruise-cache.json --include-only --reaches '$(watskeburt $SHA -T regex)' --output-type mermaid >> $GITHUB_STEP_SUMMARY && echo '```\n\n' >> $GITHUB_STEP_SUMMARY",
"dependencies": [
"depcruise:json"
]
},
"depcruise:github-actions:mermaid:diff": {
"command": "echo '\n\n```mermaid' >> $GITHUB_STEP_SUMMARY && depcruise-fmt node_modules/.cache/depcruise-cache.json --include-only '^(bin|src)' --focus '$(watskeburt $SHA -T regex)' --output-type mermaid >> $GITHUB_STEP_SUMMARY && echo '```\n\n' >> $GITHUB_STEP_SUMMARY",
"command": "echo '\n\n```mermaid' >> $GITHUB_STEP_SUMMARY && depcruise-fmt node_modules/.cache/depcruise-cache.json --include-only '^(bin|src)' --highlight '$(watskeburt $SHA -T regex)' --output-type mermaid >> $GITHUB_STEP_SUMMARY && echo '```\n\n' >> $GITHUB_STEP_SUMMARY",
"dependencies": [
"depcruise:json"
]
Expand Down

0 comments on commit c21fcc8

Please sign in to comment.