-
-
Notifications
You must be signed in to change notification settings - Fork 127
fix(ci): release on shared pipeline changes #1985
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
5 commits
Select commit
Hold shift + click to select a range
f4ad01d
fix(ci): release on shared pipeline changes
riderx 2221fcb
fix(ci): test release scope changes in both workspaces
riderx d1d2727
fix(ci): trigger discord on cli releases
riderx 893090c
test(ci): run release scope specs concurrently
riderx 1dd299b
fix(ci): exclude workflow files from sonar
riderx 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 |
|---|---|---|
| @@ -1,7 +1,8 @@ | ||
| # | ||
| # We pin workflow actions by commit SHA, which creates noisy GitHub Actions | ||
| # hotspot findings in Sonar. Disable that analysis for this repository. | ||
| # GitHub Actions workflow files create noisy security hotspot findings in | ||
| # Sonar. Keep workflow analysis disabled and exclude CI automation files from | ||
| # the general scan for this repository. | ||
| sonar.githubactions.activate=false | ||
|
|
||
| sonar.exclusions=cli/**,scripts/**,tests/**,scriptable/**,.cursor/**,playwright/**,formkit.theme.ts,sql/**,supabase/seed.sql,supabase/tests/**,src/components/comp_def.ts,supabase/functions/_backend/utils/supabase.types.ts,src/types/supabase.types.ts | ||
| sonar.cpd.exclusions=cli/**,scripts/**,tests/**,scriptable/**,.cursor/**,playwright/**,formkit.theme.ts,sql/**,supabase/seed.sql,supabase/migrations/**,supabase/functions/_backend/utils/conversion.ts,supabase/tests/**,supabase/functions/_backend/plugins/updates_lite.ts,supabase/functions/_backend/utils/pg_lite.ts,supabase/functions/_backend/utils/supabase.types.ts,src/types/supabase.types.ts,src/components/comp_def.ts,src/services/conversion.ts | ||
| sonar.exclusions=.github/workflows/**,.github/scripts/**,cli/**,scripts/**,tests/**,scriptable/**,.cursor/**,playwright/**,formkit.theme.ts,sql/**,supabase/seed.sql,supabase/tests/**,src/components/comp_def.ts,supabase/functions/_backend/utils/supabase.types.ts,src/types/supabase.types.ts | ||
| sonar.cpd.exclusions=.github/workflows/**,.github/scripts/**,cli/**,scripts/**,tests/**,scriptable/**,.cursor/**,playwright/**,formkit.theme.ts,sql/**,supabase/seed.sql,supabase/migrations/**,supabase/functions/_backend/utils/conversion.ts,supabase/tests/**,supabase/functions/_backend/plugins/updates_lite.ts,supabase/functions/_backend/utils/pg_lite.ts,supabase/functions/_backend/utils/supabase.types.ts,src/types/supabase.types.ts,src/components/comp_def.ts,src/services/conversion.ts | ||
|
riderx marked this conversation as resolved.
|
||
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,45 @@ | ||
| import { describe, expect, it } from 'vitest' | ||
| import { matchesComponent } from '../scripts/release-scope.ts' | ||
|
|
||
| describe('release scope matching', () => { | ||
| it.concurrent('treats shared release infrastructure as affecting both components', () => { | ||
| const files = [ | ||
| '.github/workflows/tests.yml', | ||
| '.github/workflows/bump_version.yml', | ||
| '.github/scripts/start-background-service.sh', | ||
| 'scripts/setup-bun.sh', | ||
| 'scripts/release-scope.ts', | ||
| ] | ||
|
|
||
| expect(matchesComponent('capgo', files)).toBe(true) | ||
| expect(matchesComponent('cli', files)).toBe(true) | ||
| }) | ||
|
|
||
| it.concurrent('treats capgo deploy workflow changes as capgo-only releases', () => { | ||
| const files = ['.github/workflows/build_and_deploy.yml'] | ||
|
|
||
| expect(matchesComponent('capgo', files)).toBe(true) | ||
| expect(matchesComponent('cli', files)).toBe(false) | ||
| }) | ||
|
|
||
| it.concurrent('treats cli publish workflow changes as cli-only releases', () => { | ||
| const files = ['.github/workflows/publish_cli.yml'] | ||
|
|
||
| expect(matchesComponent('capgo', files)).toBe(false) | ||
| expect(matchesComponent('cli', files)).toBe(true) | ||
| }) | ||
|
|
||
| it.concurrent('keeps runtime code scoped to the matching component', () => { | ||
| expect(matchesComponent('capgo', ['src/pages/index.vue'])).toBe(true) | ||
| expect(matchesComponent('cli', ['src/pages/index.vue'])).toBe(false) | ||
| expect(matchesComponent('capgo', ['cli/src/index.ts'])).toBe(false) | ||
| expect(matchesComponent('cli', ['cli/src/index.ts'])).toBe(true) | ||
| }) | ||
|
|
||
| it.concurrent('does not release on unrelated changes', () => { | ||
| const files = ['README.md'] | ||
|
|
||
| expect(matchesComponent('capgo', files)).toBe(false) | ||
| expect(matchesComponent('cli', files)).toBe(false) | ||
| }) | ||
| }) |
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.