-
Notifications
You must be signed in to change notification settings - Fork 2
ci-cd: parallel tests, docs deployment preview and release #329
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
Open
cusma
wants to merge
20
commits into
main
Choose a base branch
from
ci-cd/docs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
c14f1f3
chore: fix scope; update mdbook
cusma 0fc38c6
chore: deploy docs on release
cusma 4a3b7e1
chore: deploy preview on docs pr
cusma 592d592
chore: run on docs diff; deploy preview pr
cusma 228de3b
chore: bump action versions
cusma a5d2118
chore: shard tests scoped by directory
cusma ce1ace4
chore: fix pytest command
cusma a705302
ci: improve concurrency check
cusma 50b3704
ci: improve exclusion checks
cusma 55a8040
ci: inherit permissions
cusma 29f80d0
chore: fix inherit
cusma 663a82d
chore: nit
cusma 4f383a3
Merge branch 'main' into ci-cd/docs
cusma 26f6141
chore: workflow passes if no change is detected on docs
cusma 82866df
chore: nit
cusma cb7d7b5
chore: job names
cusma 4ee143e
ci: run docs ci on workflow call even with no diff
cusma c7434be
ci: trigger on workflow call
cusma 69486bd
ci: run on workflow call
cusma 7748f9b
chore: handle concurrency group from workflow call
cusma 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
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 |
|---|---|---|
|
|
@@ -7,6 +7,7 @@ on: | |
|
|
||
| jobs: | ||
| check-deployments: | ||
| name: Check Deployments (release PRs only) | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
|
|
||
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 |
|---|---|---|
| @@ -1,23 +1,66 @@ | ||
| name: Validate docs | ||
| name: Validate & Preview docs | ||
|
|
||
| on: | ||
| workflow_call: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| branches: [ main ] | ||
| types: [opened, reopened, synchronize, ready_for_review] | ||
cusma marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| workflow_call: | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pages: write | ||
| id-token: write | ||
|
|
||
| concurrency: | ||
| group: ${{ github.event.pull_request.number && format('pages-pr-{0}', github.event.pull_request.number) || 'pages-release' }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| validate-docs: | ||
| runs-on: "ubuntu-latest" | ||
| if: github.head_ref != 'release' && (github.event.pull_request == null || !github.event.pull_request.draft) | ||
| name: Validate & Preview Docs (if changed) | ||
| runs-on: ubuntu-latest | ||
| if: ${{ (github.event.pull_request && !github.event.pull_request.draft) || github.event_name == 'workflow_call' }} | ||
| environment: | ||
| name: preview | ||
| url: ${{ steps.deploy.outputs.page_url }} | ||
|
|
||
| steps: | ||
| - name: Checkout source code | ||
| uses: actions/checkout@v5 | ||
|
|
||
| - name: Docs CI actions | ||
| - name: Detect docs changes | ||
| id: changes | ||
| uses: dorny/paths-filter@v3 | ||
| with: | ||
| filters: | | ||
| docs: | ||
| - 'docs/**' | ||
| - 'README.md' | ||
| - 'SECURITY.md' | ||
|
|
||
| - name: No docs changes — mark check as passed | ||
| if: ${{ steps.changes.outputs.docs != 'true' }} | ||
| run: | | ||
| echo "No docs changes detected. Skipping validation and preview." | ||
| echo "This job still succeeds so required status is green." | ||
|
|
||
| - name: Docs CI actions (lint, links, mdBook build) | ||
| if: ${{ steps.changes.outputs.docs == 'true' || github.event_name == 'workflow_call' }} | ||
| uses: ./.github/actions/docs-ci | ||
|
|
||
| - name: Configure Pages | ||
| if: ${{ steps.changes.outputs.docs == 'true' || github.event_name == 'workflow_call' }} | ||
| uses: actions/configure-pages@v5 | ||
|
|
||
| - name: Upload Pages artifact | ||
| if: ${{ steps.changes.outputs.docs == 'true' || github.event_name == 'workflow_call' }} | ||
| uses: actions/upload-pages-artifact@v4 | ||
| with: | ||
| path: ./book | ||
|
|
||
| - name: Deploy (PR Preview) | ||
| id: deploy | ||
| if: ${{ steps.changes.outputs.docs == 'true' || github.event_name == 'workflow_call' }} | ||
| uses: actions/deploy-pages@v4 | ||
| with: | ||
| preview: true | ||
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
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.