Skip to content
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

GitHub Actions #3769

Merged
merged 10 commits into from
Nov 21, 2024
Merged

GitHub Actions #3769

merged 10 commits into from
Nov 21, 2024

Conversation

brandonpage
Copy link
Contributor

@brandonpage brandonpage commented Nov 2, 2024

Github Actions implementation with:

  • PR workflow
    • Static Analysis - issues found in files modified by your PR will be reported back in a comment.
    • Real dynamic test matrix - only modified libs tests will be run (and no more hacky starting all of them and canceling what we don't need like w/ CircleCI). Modifying CI files causes all tests to run.
    • Test Results summary and in-line test failure comments on your PR!
  • Nightly workflow - run twice a week on a cron.
  • Fastlane has been completely removed in favor of actions/bash. I tried to use Fastlane Swift but SPM was a nightmare.
  • Re-written Danger (Ruby). I tried to switch to Danger Swift but again, SPM for CI and not in the root of the project is a real pain.
    • Danger now uses the more secure generated GITHUB_TOKEN instead of a personal access token.
  • Tests are run with mxcl/xcodebuild which has the awesome ability to take in semver inputs. This means if we keep running on the macos-latest image and run our tests with xcode set to ^16 and ios set to ^18 we should automatically run against the latest available with no code changes until Xcode 17/iOS 19 are released.
  • CodeCov
  • Dispatch workflow so one off test runs can be manually trigged from the browser.

Example dynamic test matrix:
Screenshot 2024-11-03 at 7 18 41 PM

What's not in this PR:

  • Adding a dispatch workflow that can be trigged manually from the browser w/ inputs.
  • CodeCov
  • SwiftLint?
  • Removal of CircleCi 😉

Copy link
Contributor

@wmathurin wmathurin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!

@brandonpage brandonpage changed the title GitHub Actions [Hold Reviews] GitHub Actions Nov 4, 2024
…inished. Move danger files into their own folder. Add CodeCov. Fix static analysis reporting.
@brandonpage brandonpage changed the title [Hold Reviews] GitHub Actions GitHub Actions Nov 4, 2024

if modified_file_names.include?(report_file_name) || added_file_names.include?(report_file_name)
issues = report['diagnostics']
print "File modified in PR: #{file}, has #{issue.count} issues.\n"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am going to leave the various prints in this file so we can check it is working. It's not super obvious if it breaks because it only reports issues in files modified in the PR.

@codecov-commenter
Copy link

codecov-commenter commented Nov 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.26%. Comparing base (c441d2d) to head (f445324).
Report is 7 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #3769      +/-   ##
==========================================
- Coverage   63.37%   63.26%   -0.11%     
==========================================
  Files         225      225              
  Lines       21538    21576      +38     
==========================================
+ Hits        13649    13651       +2     
- Misses       7889     7925      +36     
Flag Coverage Δ
SalesforceAnalytics 27.25% <ø> (+0.06%) ⬆️
SalesforceSDKCommon 45.88% <ø> (-0.18%) ⬇️
SmartStore 23.56% <ø> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 4 files with indirect coverage changes

@brandonpage
Copy link
Contributor Author

brandonpage commented Nov 14, 2024

mxcl/xcodebuild just added support for xcbeautify (instead of the default xcpretty), which comes with in line warnings and test failures:

Screenshot 2024-11-14 at 12 14 58 PM

Test failures (and warnings unfortunately) are commented in line on PRs even when those lines/files are not modified. 😎

@brandonpage brandonpage merged commit 8347820 into forcedotcom:dev Nov 21, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants