diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 972ce1c..156e8d1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -61,7 +61,9 @@ CheatSheet builds and tests on Xcode Cloud, not GitHub Actions. Every push to `develop` or `main`, and every pull request against them, triggers a build. Xcode Cloud regenerates the project from `project.yml` on clone (`ci_scripts/ci_post_clone.sh`), so nothing needs to change in that script when -adding new source files. +adding new source files. The UI test gate uses the `CheatSheetiOSUISmoke` +scheme, which skips `testQASweep` and `MarketingScreenshotTests`; run those on +demand through `CheatSheetiOSUI` with `-only-testing`. ## Widget Signing diff --git a/ci_scripts/Package.resolved b/ci_scripts/Package.resolved new file mode 100644 index 0000000..adc6da1 --- /dev/null +++ b/ci_scripts/Package.resolved @@ -0,0 +1,15 @@ +{ + "originHash" : "fa7ab4bc9518bd495b4c17d8a96bebc401eb5a2f99ae8b4bc316b04b7b2aea05", + "pins" : [ + { + "identity" : "swiftsdk", + "kind" : "remoteSourceControl", + "location" : "https://github.com/TelemetryDeck/SwiftSDK", + "state" : { + "revision" : "58f436299d3f6710bcedc18aff26480aaf1879fc", + "version" : "2.14.2" + } + } + ], + "version" : 3 +} diff --git a/ci_scripts/ci_post_clone.sh b/ci_scripts/ci_post_clone.sh index d6e4592..40e0fd7 100755 --- a/ci_scripts/ci_post_clone.sh +++ b/ci_scripts/ci_post_clone.sh @@ -19,6 +19,15 @@ fi cd "$CI_PRIMARY_REPOSITORY_PATH" xcodegen generate --spec project.yml --project . --project-root . +# Xcode Cloud disables automatic SPM resolution and requires a resolved +# manifest to already exist at this path before it will build +# (https://developer.apple.com/documentation/xcode/making-dependencies-available-to-xcode-cloud). +# CheatSheet.xcodeproj is gitignored, so this pin can't live at its normal +# location in the repo; keep the source of truth in ci_scripts/ and copy it +# into place right after the project is generated. +mkdir -p CheatSheet.xcodeproj/project.xcworkspace/xcshareddata/swiftpm +cp ci_scripts/Package.resolved CheatSheet.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved + # Fail loudly if the workflow's Environment tab picked an SDK major CheatSheet # does not expect (a beta, or a version this branch has not been updated for), # rather than silently archiving something that will bounce at App Store diff --git a/project.yml b/project.yml index 100dec8..41e0219 100644 --- a/project.yml +++ b/project.yml @@ -258,3 +258,22 @@ schemes: - CheatSheetiOSUITests run: config: Debug + # Xcode Cloud's Test action cannot pass -skip-testing, so the gate the + # retired GitHub Actions pipeline ran lives here as scheme skips instead. + # Skip by name, never allow-list: new UI test classes run automatically. + # testQASweep (flaky screenshot monolith) and MarketingScreenshotTests + # (App Store captures) stay on demand via CheatSheetiOSUI and -only-testing. + CheatSheetiOSUISmoke: + build: + targets: + CheatSheetiOS: all + CheatSheetiOSWidgets: all + CheatSheetiOSUITests: testing + test: + targets: + - name: CheatSheetiOSUITests + skippedTests: + - CheatSheetiOSUITests/testQASweep() + - MarketingScreenshotTests + run: + config: Debug