From f9507ae3cc19ba959ad5be2173456162888ce131 Mon Sep 17 00:00:00 2001 From: NachoSoto Date: Mon, 28 Aug 2023 16:02:56 -0700 Subject: [PATCH] `Paywalls`: reference test snapshots from submodule (#3115) See https://github.com/RevenueCat/purchases-ios-snapshots --- .circleci/config.yml | 8 ++++++++ .gitmodules | 3 +++ Package.swift | 2 +- Tests/RevenueCatUITests/Templates/__Snapshots__ | 1 + purchases-ios-snapshots | 1 + 5 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 .gitmodules create mode 120000 Tests/RevenueCatUITests/Templates/__Snapshots__ create mode 160000 purchases-ios-snapshots diff --git a/.circleci/config.yml b/.circleci/config.yml index c7087cd34c..faecc886a8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -163,6 +163,11 @@ commands: paths: - vendor/bundle + update-submodules: + steps: + - run: git submodule sync + - run: git submodule update --init + compress_result_bundle: parameters: directory: @@ -341,6 +346,7 @@ jobs: <<: *base-job steps: - checkout + - update-submodules - update-spm-installation-commit - run: name: SPM RevenueCatUI Tests @@ -367,6 +373,7 @@ jobs: <<: *base-job steps: - checkout + - update-submodules - update-spm-installation-commit - run: name: SPM RevenueCatUI Release Build @@ -400,6 +407,7 @@ jobs: <<: *base-job steps: - checkout + - update-submodules - update-spm-installation-commit - run: name: SPM RevenueCatUI Tests diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000000..a85b0f472e --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "purchases-ios-snapshots"] + path = purchases-ios-snapshots + url = git@github.com:RevenueCat/purchases-ios-snapshots.git diff --git a/Package.swift b/Package.swift index 1d240fb07d..d9822938fe 100644 --- a/Package.swift +++ b/Package.swift @@ -80,7 +80,7 @@ let package = Package( "Nimble", .product(name: "SnapshotTesting", package: "swift-snapshot-testing") ], - exclude: ["Templates/__Snapshots__"], + exclude: ["Templates/__Snapshots__", "Data/__Snapshots__", "TestPlans"], resources: [.copy("Resources/header.jpg"), .copy("Resources/background.jpg")]) ] ) diff --git a/Tests/RevenueCatUITests/Templates/__Snapshots__ b/Tests/RevenueCatUITests/Templates/__Snapshots__ new file mode 120000 index 0000000000..6d29831968 --- /dev/null +++ b/Tests/RevenueCatUITests/Templates/__Snapshots__ @@ -0,0 +1 @@ +../../../purchases-ios-snapshots/Templates/__Snapshots__ \ No newline at end of file diff --git a/purchases-ios-snapshots b/purchases-ios-snapshots new file mode 160000 index 0000000000..5475514957 --- /dev/null +++ b/purchases-ios-snapshots @@ -0,0 +1 @@ +Subproject commit 5475514957768422137eb32fcd7f101176fa5c6e