diff --git a/.circleci/config.yml b/.circleci/config.yml index d872bb7620..641cdfb5d0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,7 +9,7 @@ version: 2.1 parameters: action: type: enum - enum: [default, bump] + enum: [default, bump, run-manual-tests] default: default generate_snapshots: default: false @@ -389,6 +389,14 @@ commands: jobs: spm-release-build-xcode-14: <<: *base-job + parameters: + xcode_version: + type: string + default: '14.3.0' + install_swiftlint: + type: boolean + default: false + steps: - checkout - run: @@ -398,6 +406,11 @@ jobs: spm-release-build-xcode-15: <<: *base-job + parameters: + xcode_version: + type: string + default: '15.2.0' + steps: - checkout - run: @@ -407,6 +420,14 @@ jobs: spm-xcode-14-1: <<: *base-job + parameters: + xcode_version: + type: string + default: '14.1.0' + install_swiftlint: + type: boolean + default: false + steps: - checkout - run: @@ -418,6 +439,15 @@ jobs: command: swift build -c release --target RevenueCatUI no_output_timeout: 30m + pod-lib-lint: + <<: *base-job + steps: + - checkout + - install-dependencies + - run: + name: Check pods and deployment targets + command: bundle exec fastlane check_pods + spm-release-build: <<: *base-job steps: @@ -456,6 +486,14 @@ jobs: spm-revenuecat-ui-ios-15: <<: *base-job + parameters: + xcode_version: + type: string + default: '14.3.0' + install_swiftlint: + type: boolean + default: false + steps: - checkout - install-dependencies: @@ -482,6 +520,14 @@ jobs: spm-revenuecat-ui-ios-16: <<: *base-job + parameters: + xcode_version: + type: string + default: '14.3.0' + install_swiftlint: + type: boolean + default: false + steps: - checkout - install-dependencies: @@ -517,6 +563,14 @@ jobs: spm-revenuecat-ui-ios-17: <<: *base-job + parameters: + xcode_version: + type: string + default: '15.2.0' + install_swiftlint: + type: boolean + default: true + steps: - checkout - install-dependencies: @@ -592,6 +646,14 @@ jobs: run-test-ios-17: <<: *base-job + parameters: + xcode_version: + type: string + default: '15.2.0' + install_swiftlint: + type: boolean + default: false + steps: - checkout - install-dependencies: @@ -617,6 +679,14 @@ jobs: run-test-ios-16: <<: *base-job + parameters: + xcode_version: + type: string + default: '14.3.0' + install_swiftlint: + type: boolean + default: false + steps: - checkout - install-dependencies: @@ -646,6 +716,14 @@ jobs: run-test-ios-15: <<: *base-job + parameters: + xcode_version: + type: string + default: '14.3.0' + install_swiftlint: + type: boolean + default: false + steps: - checkout - install-dependencies: @@ -716,6 +794,16 @@ jobs: run-test-ios-14: <<: *base-job + # Pre-iOS 15 requires macOS 12 which requires Xcode 14.2 + # See https://circleci.com/docs/using-macos/#supported-xcode-versions + parameters: + xcode_version: + type: string + default: '14.2.0' + install_swiftlint: + type: boolean + default: false + steps: - checkout - install-dependencies: @@ -747,6 +835,13 @@ jobs: run-test-ios-13: <<: *base-job + parameters: + xcode_version: + type: string + default: '14.2.0' + install_swiftlint: + type: boolean + default: false steps: - checkout - install-dependencies: @@ -857,6 +952,15 @@ jobs: docs-build: <<: *base-job + parameters: + xcode_version: + type: string + # needs to be xcode 14 since we couldn't get xcode 15 to get along with --additional-symbol-graph-dir + # https://github.com/RevenueCat/purchases-ios/pull/1997 + default: '14.3.0' + install_swiftlint: + type: boolean + default: true steps: - setup-git-credentials - checkout @@ -869,6 +973,15 @@ jobs: docs-deploy: <<: *base-job + parameters: + xcode_version: + type: string + # needs to be xcode 14 since we couldn't get xcode 15 to get along with --additional-symbol-graph-dir + # https://github.com/RevenueCat/purchases-ios/pull/1997 + default: '14.3.0' + install_swiftlint: + type: boolean + default: true steps: - setup-git-credentials - checkout @@ -1181,34 +1294,20 @@ workflows: generate-snapshot: when: << pipeline.parameters.generate_snapshots >> jobs: - - run-test-ios-17: - xcode_version: "15.2" - - run-test-ios-16: - xcode_version: '14.3.0' - install_swiftlint: false - - run-test-ios-15: - xcode_version: '14.3.0' - install_swiftlint: false - - run-test-ios-14: - xcode_version: '14.2.0' - install_swiftlint: false - - run-test-ios-13: - xcode_version: '14.2.0' - install_swiftlint: false + - run-test-ios-17 + - run-test-ios-16 + - run-test-ios-15 + - run-test-ios-14 + - run-test-ios-13 - run-test-macos - run-test-watchos generate_revenuecatui_snapshots: when: << pipeline.parameters.generate_revenuecatui_snapshots >> jobs: - - spm-revenuecat-ui-ios-15: - xcode_version: '14.3.0' - install_swiftlint: false - - spm-revenuecat-ui-ios-16: - xcode_version: '14.3.0' - install_swiftlint: false - - spm-revenuecat-ui-ios-17: - xcode_version: "15.2" + - spm-revenuecat-ui-ios-15 + - spm-revenuecat-ui-ios-16 + - spm-revenuecat-ui-ios-17 build-test: when: @@ -1219,109 +1318,26 @@ workflows: - not: << pipeline.parameters.generate_revenuecatui_snapshots >> jobs: - lint - - docs-build: - xcode_version: '14.3.0' - install_swiftlint: false - - spm-release-build - - spm-custom-entitlement-computation-build - - spm-receipt-parser - - spm-release-build-xcode-14: - xcode_version: '14.3.0' - install_swiftlint: false - - spm-release-build-xcode-15: - xcode_version: '15.2' - - spm-xcode-14-1: - xcode_version: '14.1.0' - install_swiftlint: false - - spm-revenuecat-ui-ios-15: - xcode_version: '14.3.0' - install_swiftlint: false - - spm-revenuecat-ui-ios-16: - xcode_version: '14.3.0' - install_swiftlint: false - - spm-revenuecat-ui-ios-17: - xcode_version: "15.2" - - spm-revenuecat-ui-watchos - - run-test-macos - - run-test-ios-17: - xcode_version: "15.2" - - run-test-ios-16: - xcode_version: '14.3.0' - install_swiftlint: false - - run-test-ios-15: - xcode_version: '14.3.0' - install_swiftlint: false - - run-test-watchos - - run-test-tvos - # Pre-iOS 15 requires macOS 12 which requires Xcode 14.2 - # See https://circleci.com/docs/using-macos/#supported-xcode-versions - - run-test-ios-14: - xcode_version: '14.2.0' - install_swiftlint: false - - run-test-ios-13: - xcode_version: '14.2.0' - install_swiftlint: false - <<: *release-branches-and-main - - build-tv-watch-and-macos - - build-visionos - - backend-integration-tests-SK1: - filters: - branches: - # Forked pull requests have CIRCLE_BRANCH set to pull/XXX - ignore: /pull\/[0-9]+/ - - backend-integration-tests-SK2: - filters: - branches: - # Forked pull requests have CIRCLE_BRANCH set to pull/XXX - ignore: /pull\/[0-9]+/ - - backend-integration-tests-other: - filters: - branches: - # Forked pull requests have CIRCLE_BRANCH set to pull/XXX - ignore: /pull\/[0-9]+/ - - backend-integration-tests-offline: - # These tests are flaky due to FB13133387 so we don't want the noise in every PR - <<: *release-branches-and-main - - backend-integration-tests-custom-entitlements: - filters: - branches: - # Forked pull requests have CIRCLE_BRANCH set to pull/XXX - ignore: /pull\/[0-9]+/ + - run-test-ios-17 + - pod-lib-lint deploy: when: - not: - equal: [scheduled_pipeline, << pipeline.trigger_source >>] + and: + - not: + equal: [scheduled_pipeline, << pipeline.trigger_source >>] + - matches: + pattern: "^release/.*$" + value: << pipeline.git.branch >> jobs: - - release-checks: - <<: *release-branches - - installation-tests-cocoapods: - <<: *release-branches - - installation-tests-swift-package-manager: - <<: *release-branches - - installation-tests-custom-entitlement-computation-swift-package-manager: - <<: *release-branches - - installation-tests-receipt-parser: - <<: *release-branches - - installation-tests-carthage: - <<: *release-branches - - installation-tests-xcode-direct-integration: - <<: *release-branches + - release-checks - hold: type: approval requires: - release-checks - - installation-tests-cocoapods - - installation-tests-swift-package-manager - - installation-tests-custom-entitlement-computation-swift-package-manager - - installation-tests-carthage - - installation-tests-xcode-direct-integration - - installation-tests-receipt-parser - <<: *release-branches - tag-release-branch: requires: - hold - <<: *release-branches - make-release: <<: *release-tags - push-revenuecat-pod: @@ -1339,7 +1355,6 @@ workflows: <<: *release-tags - docs-deploy: <<: *release-tags - xcode_version: '14.3.0' - deploy-purchase-tester: <<: *release-tags - notify-on-non-patch-release-branches: @@ -1347,6 +1362,7 @@ workflows: - make-release <<: *non-patch-release-branches context: slack-secrets + snapshot-bump: when: not: @@ -1354,9 +1370,11 @@ workflows: jobs: - prepare-next-version: <<: *only-main-branch + danger: jobs: - danger + weekly-run-workflow: when: and: @@ -1380,3 +1398,44 @@ workflows: equal: [bump, << pipeline.parameters.action >>] jobs: - release-train + + # to trigger tests manually, log into circleCI, select the project, a branch, and then click "Trigger Pipeline" + # and add a parameter called "run-manual-tests" + all-tests: + when: + or: + - matches: + pattern: "^release/.*$" + value: << pipeline.git.branch >> + - equal: + - "run-manual-tests" + - << pipeline.parameters.action >> + jobs: + - backend-integration-tests-SK1 + - backend-integration-tests-SK2 + - backend-integration-tests-custom-entitlements + - backend-integration-tests-other + - build-tv-watch-and-macos + - build-visionos + - docs-build + - run-test-ios-14 + - run-test-ios-15 + - run-test-ios-16 + - run-test-macos + - run-test-tvos + - run-test-watchos + - spm-custom-entitlement-computation-build + - spm-receipt-parser + - spm-release-build + - spm-release-build-xcode-14 + - spm-release-build-xcode-15 + - spm-revenuecat-ui-ios-15 + - spm-revenuecat-ui-ios-16 + - spm-revenuecat-ui-ios-17 + - spm-revenuecat-ui-watchos + - installation-tests-cocoapods + - installation-tests-swift-package-manager + - installation-tests-custom-entitlement-computation-swift-package-manager + - installation-tests-carthage + - installation-tests-xcode-direct-integration + - installation-tests-receipt-parser diff --git a/Tests/TestingApps/PaywallsTester/PaywallsTester/Config/LocalConfigItems.swift b/Tests/TestingApps/PaywallsTester/PaywallsTester/Config/LocalConfigItems.swift index bc940374fb..e780a12e5e 100644 --- a/Tests/TestingApps/PaywallsTester/PaywallsTester/Config/LocalConfigItems.swift +++ b/Tests/TestingApps/PaywallsTester/PaywallsTester/Config/LocalConfigItems.swift @@ -23,7 +23,7 @@ import Foundation // Then add local keys: // extension ConfigItem { // static var apiKey: String { -// "appl_FOObar" +// "REVENUECAT_API_KEY" // } // } extension ConfigItem { diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 681208430f..bdbd608365 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -250,7 +250,6 @@ platform :ios do desc "build tvOS, watchOS, macOS" lane :build_tv_watch_mac do |options| - check_pods load_spm_dependencies build_release(platform: 'watchOS') build_release(platform: 'tvOS') @@ -259,7 +258,6 @@ platform :ios do desc "macOS build" lane :build_mac do |options| - check_pods load_spm_dependencies build_release(platform: 'macOS') end