-
-
Notifications
You must be signed in to change notification settings - Fork 229
ci: Skip device tests for non-mobile PRs #4909
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,8 +6,48 @@ on: | |
| - main | ||
| - release/* | ||
| pull_request: | ||
| paths-ignore: | ||
| - "**.md" | ||
| paths: | ||
| # Core SDK (transitive dependency of all mobile packages) | ||
| - 'src/Sentry/**' | ||
| - 'src/Sentry.Extensions.Logging/**' | ||
| - 'src/Sentry.Compiler.Extensions/**' | ||
| # Mobile-specific packages | ||
| - 'src/Sentry.Maui/**' | ||
| - 'src/Sentry.Maui.CommunityToolkit.Mvvm/**' | ||
| - 'src/Sentry.Bindings.Android/**' | ||
| - 'src/Sentry.Bindings.Cocoa/**' | ||
| - 'src/Sentry.Android.AssemblyReader/**' | ||
| # Device test app and test projects that run on device | ||
| - 'test/Sentry.Maui.Device.TestApp/**' | ||
| - 'test/Sentry.Tests/**' | ||
| - 'test/Sentry.Extensions.Logging.Tests/**' | ||
| - 'test/Sentry.Maui.Tests/**' | ||
| - 'test/Sentry.Maui.CommunityToolkit.Mvvm.Tests/**' | ||
| - 'test/Sentry.Android.AssemblyReader.Tests/**' | ||
| - 'test/Sentry.Testing/**' | ||
| - 'test/AndroidTestApp/**' | ||
| # Integration tests | ||
| - 'integration-test/android.Tests.ps1' | ||
| - 'integration-test/ios.Tests.ps1' | ||
| - 'integration-test/net9-maui/**' | ||
| - 'integration-test/common.ps1' | ||
| - 'integration-test/Directory.Build.*' | ||
|
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. Missing
|
||
| # Native libraries and modules | ||
| - 'lib/sentrysupplemental/**' | ||
| - 'lib/sentry-android-supplemental/**' | ||
| - 'modules/sentry-native/**' | ||
| - 'modules/sentry-cocoa/**' | ||
| - 'modules/sentry-cocoa.properties' | ||
| # Build configuration (affects all builds) | ||
| - 'global.json' | ||
| - 'Directory.Build.props' | ||
| - 'Directory.Build.targets' | ||
| - 'nuget.config' | ||
| # Scripts and CI | ||
| - 'scripts/device-test.ps1' | ||
| - 'scripts/device-test-utils.ps1' | ||
| - '.github/workflows/device-tests-android.yml' | ||
| - '.github/actions/**' | ||
|
Comment on lines
9
to
50
This comment was marked as resolved.
Sorry, something went wrong.
Member
Author
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. Accepted (mostly). Added the following missing paths in 835075a:
Rejected Rejected
cursor[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,8 +6,48 @@ on: | |
| - main | ||
| - release/* | ||
| pull_request: | ||
| paths-ignore: | ||
| - "**.md" | ||
| paths: | ||
| # Core SDK (transitive dependency of all mobile packages) | ||
| - 'src/Sentry/**' | ||
| - 'src/Sentry.Extensions.Logging/**' | ||
bruno-garcia marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - 'src/Sentry.Compiler.Extensions/**' | ||
| # Mobile-specific packages | ||
| - 'src/Sentry.Maui/**' | ||
| - 'src/Sentry.Maui.CommunityToolkit.Mvvm/**' | ||
| - 'src/Sentry.Bindings.Android/**' | ||
| - 'src/Sentry.Bindings.Cocoa/**' | ||
| - 'src/Sentry.Android.AssemblyReader/**' | ||
| # Device test app and test projects that run on device | ||
| - 'test/Sentry.Maui.Device.TestApp/**' | ||
| - 'test/Sentry.Tests/**' | ||
| - 'test/Sentry.Extensions.Logging.Tests/**' | ||
| - 'test/Sentry.Maui.Tests/**' | ||
| - 'test/Sentry.Maui.CommunityToolkit.Mvvm.Tests/**' | ||
| - 'test/Sentry.Android.AssemblyReader.Tests/**' | ||
| - 'test/Sentry.Testing/**' | ||
| - 'test/AndroidTestApp/**' | ||
|
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. Identical path filters cause unnecessary cross-platform CI runsLow Severity The path filters in both workflow files are identical (copy-pasted), so Android-only paths like Additional Locations (1)
Collaborator
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. That's true... it could be optimised a bit further. That would be quite useful when working on iOS exclusively or just Android (which we frequently do). |
||
| # Integration tests | ||
| - 'integration-test/android.Tests.ps1' | ||
| - 'integration-test/ios.Tests.ps1' | ||
| - 'integration-test/net9-maui/**' | ||
| - 'integration-test/common.ps1' | ||
| - 'integration-test/Directory.Build.*' | ||
| # Native libraries and modules | ||
| - 'lib/sentrysupplemental/**' | ||
| - 'lib/sentry-android-supplemental/**' | ||
| - 'modules/sentry-native/**' | ||
| - 'modules/sentry-cocoa/**' | ||
| - 'modules/sentry-cocoa.properties' | ||
| # Build configuration (affects all builds) | ||
| - 'global.json' | ||
| - 'Directory.Build.props' | ||
| - 'Directory.Build.targets' | ||
| - 'nuget.config' | ||
| # Scripts and CI | ||
| - 'scripts/device-test.ps1' | ||
| - 'scripts/device-test-utils.ps1' | ||
| - '.github/workflows/device-tests-ios.yml' | ||
| - '.github/actions/**' | ||
bruno-garcia marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
|
|
||


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.
Previously this workflow would not run for PRs that only changed
*.mdfiles. Withpull_request.pathsalone, a docs-only change under a listed directory (e.g.src/Sentry/**/README.md) will now trigger the full device test suite. If you want to preserve the prior behavior, add apull_request.paths-ignoreentry for**/*.mdalongsidepaths.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.
Rejected. GitHub Actions does support combining
pathsandpaths-ignore, but this is an extremely rare edge case — someone would need to edit a markdown file insidesrc/Sentry/(these source directories almost never contain .md files). The cost of a false trigger is just one unnecessary CI run, while addingpaths-ignoreadds complexity for near-zero benefit. The push trigger on main/release catches everything anyway.