-
-
Notifications
You must be signed in to change notification settings - Fork 171
ci: optimize CI workflow with path filtering #775
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
8cc2f5a
test(ci): improve release workflow with better error handling and rem…
grdsdev 488f061
test(ci): add release workflow testing infrastructure
grdsdev 9ed393c
docs: add release workflow testing guide
grdsdev 09e4f45
test(ci): trigger CI workflow to test release process
grdsdev 14687a6
feat: add feature test for semantic-release analysis
grdsdev f8ec4f7
test(ci): add CI monitoring script for release workflow testing
grdsdev be7a567
feat(ci): add wait-on-check action to ensure CI passes before release
grdsdev 9721e6c
refactor(ci): remove workflow_run triggers and use direct push triggers
grdsdev 9be7211
fix(ci): remove wait-on-check action that was causing issues
grdsdev 5944c74
remove all files used for testing
grdsdev 882140c
fix release.yml
grdsdev fd8abdd
feat(ci): add path filtering to optimize CI workflow execution
grdsdev 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 |
---|---|---|
|
@@ -4,9 +4,33 @@ on: | |
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'Sources/**' | ||
- 'Tests/**' | ||
- 'Examples/**' | ||
- '*.swift' | ||
- 'Package.swift' | ||
- 'Package.resolved' | ||
- '.github/workflows/ci.yml' | ||
- 'Makefile' | ||
- '*.xcodeproj/**' | ||
- '*.xcworkspace/**' | ||
- '.swiftpm/**' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What about |
||
pull_request: | ||
branches: | ||
- "*" | ||
paths: | ||
- 'Sources/**' | ||
- 'Tests/**' | ||
- 'Examples/**' | ||
- '*.swift' | ||
- 'Package.swift' | ||
- 'Package.resolved' | ||
- '.github/workflows/ci.yml' | ||
- 'Makefile' | ||
- '*.xcodeproj/**' | ||
- '*.xcworkspace/**' | ||
- '.swiftpm/**' | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
|
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 |
---|---|---|
|
@@ -5,27 +5,16 @@ on: | |
branches: | ||
- main | ||
- rc | ||
|
||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
check-ci-status: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Wait for CI workflow | ||
uses: lewagon/[email protected] | ||
with: | ||
ref: ${{ github.ref }} | ||
check-name: 'CI' | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
wait-interval: 30 | ||
|
||
release: | ||
runs-on: ubuntu-latest | ||
if: "!contains(github.event.head_commit.message, 'skip ci')" | ||
needs: [check-ci-status] | ||
if: ${{ !contains(github.event.head_commit.message, 'skip ci') }} | ||
permissions: | ||
contents: write | ||
issues: write | ||
|
@@ -40,6 +29,7 @@ jobs: | |
with: | ||
app-id: ${{ secrets.APP_ID }} | ||
private-key: ${{ secrets.PRIVATE_KEY }} | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
|
@@ -57,6 +47,12 @@ jobs: | |
run: npm ci | ||
|
||
- name: Run semantic-release | ||
id: semantic-release | ||
run: npx semantic-release | ||
env: | ||
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} | ||
continue-on-error: false | ||
|
||
- name: Check if release was created | ||
if: steps.semantic-release.outcome == 'success' | ||
run: echo "Release created successfully" |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't
*.swift
coverPackage.swift
? Do we need to be redundant here?