Skip to content

Commit

Permalink
test: migrated from Quick & Nimble to use XCTest to remove dependency…
Browse files Browse the repository at this point in the history
… on third party packages (#232)
  • Loading branch information
desusai7 committed Jul 4, 2024
2 parents 9718c7e + 57660ed commit 45d4ae3
Show file tree
Hide file tree
Showing 6 changed files with 387 additions and 460 deletions.
12 changes: 0 additions & 12 deletions .github/actions/test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,6 @@ runs:
run: xcodebuild -version | tee .xcode-version
shell: bash

- id: restore-carthage-cache
name: Restore Carthage cache
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84
with:
path: Carthage
key: carthage-${{ inputs.platform }}-${{ hashFiles('Cartfile.resolved') }}-${{ hashFiles('.xcode-version') }}-v1

- name: Install dependencies
if: steps.restore-carthage-cache.outputs.cache-hit != 'true'
run: carthage bootstrap --platform ${{ inputs.platform }} --use-xcframeworks --no-use-binaries --cache-builds
shell: bash

- name: Run tests
uses: mxcl/xcodebuild@6e60022a0cbe8c89278be2dd1773a2f68e7c5c87
with:
Expand Down
5 changes: 1 addition & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,5 @@
## Environment setup

We use [Carthage](https://github.com/Carthage/Carthage) to manage JWTDecode.swift's dependencies.

1. Clone this repository and enter its root directory.
2. Run `carthage bootstrap --use-xcframeworks` to fetch and build the dependencies.
3. Open `JWTDecode.xcodeproj` in Xcode.
2. Open `JWTDecode.xcodeproj` in Xcode.
2 changes: 0 additions & 2 deletions Cartfile.private

This file was deleted.

2 changes: 0 additions & 2 deletions Cartfile.resolved

This file was deleted.

117 changes: 0 additions & 117 deletions JWTDecode.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,6 @@
5C1B5D8B238711A60076E46B /* JWTHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57EA5A04237EBBCB00264C01 /* JWTHelper.swift */; };
5C1B5D8D238711B10076E46B /* JWTDecodeSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57EA5A02237EBBCA00264C01 /* JWTDecodeSpec.swift */; };
5C1B5D8E238711B30076E46B /* JWTHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57EA5A04237EBBCB00264C01 /* JWTHelper.swift */; };
5CE9C9FB26FC1E8F005A75FA /* Nimble.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5CE9C9F926FC1E8F005A75FA /* Nimble.xcframework */; };
5CE9C9FC26FC1E8F005A75FA /* Quick.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5CE9C9FA26FC1E8F005A75FA /* Quick.xcframework */; };
5CE9CA0126FC1ED3005A75FA /* Nimble.xcframework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 5CE9C9F926FC1E8F005A75FA /* Nimble.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
5CE9CA0226FC1ED5005A75FA /* Quick.xcframework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 5CE9C9FA26FC1E8F005A75FA /* Quick.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
5CE9CA0326FC1FF5005A75FA /* Nimble.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5CE9C9F926FC1E8F005A75FA /* Nimble.xcframework */; };
5CE9CA0426FC1FF5005A75FA /* Quick.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5CE9C9FA26FC1E8F005A75FA /* Quick.xcframework */; };
5CE9CA0526FC1FFB005A75FA /* Nimble.xcframework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 5CE9C9F926FC1E8F005A75FA /* Nimble.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
5CE9CA0626FC1FFB005A75FA /* Quick.xcframework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 5CE9C9FA26FC1E8F005A75FA /* Quick.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
5CE9CA0726FC2009005A75FA /* Nimble.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5CE9C9F926FC1E8F005A75FA /* Nimble.xcframework */; };
5CE9CA0826FC2009005A75FA /* Quick.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5CE9C9FA26FC1E8F005A75FA /* Quick.xcframework */; };
5CE9CA0926FC200D005A75FA /* Nimble.xcframework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 5CE9C9F926FC1E8F005A75FA /* Nimble.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
5CE9CA0A26FC200D005A75FA /* Quick.xcframework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 5CE9C9FA26FC1E8F005A75FA /* Quick.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
5CE9CA0C26FC22F8005A75FA /* JWTDecode.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5F0068E21B3B46240048928E /* JWTDecode.framework */; };
5CE9CA0D26FC23B1005A75FA /* JWTDecode.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5F0069091B3B532E0048928E /* JWTDecode.framework */; };
5CE9CA0E26FC23B8005A75FA /* JWTDecode.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 918A8E5B1D63D2E1001F787B /* JWTDecode.framework */; };
Expand Down Expand Up @@ -66,75 +54,29 @@
};
/* End PBXContainerItemProxy section */

/* Begin PBXCopyFilesBuildPhase section */
5F2614DC1C05FEAD0068DE71 /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
5CE9CA0126FC1ED3005A75FA /* Nimble.xcframework in CopyFiles */,
5CE9CA0226FC1ED5005A75FA /* Quick.xcframework in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
5F2614DF1C05FEDA0068DE71 /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
5CE9CA0526FC1FFB005A75FA /* Nimble.xcframework in CopyFiles */,
5CE9CA0626FC1FFB005A75FA /* Quick.xcframework in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
918A8E801D63DB37001F787B /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
5CE9CA0926FC200D005A75FA /* Nimble.xcframework in CopyFiles */,
5CE9CA0A26FC200D005A75FA /* Quick.xcframework in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
57EA5A02237EBBCA00264C01 /* JWTDecodeSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JWTDecodeSpec.swift; path = JWTDecodeTests/JWTDecodeSpec.swift; sourceTree = SOURCE_ROOT; };
57EA5A04237EBBCB00264C01 /* JWTHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JWTHelper.swift; path = JWTDecodeTests/JWTHelper.swift; sourceTree = SOURCE_ROOT; };
5CDF405828517BE2003840E6 /* JWTDecode.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; path = JWTDecode.playground; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
5CE9C9F926FC1E8F005A75FA /* Nimble.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Nimble.xcframework; path = Carthage/Build/Nimble.xcframework; sourceTree = "<group>"; };
5CE9C9FA26FC1E8F005A75FA /* Quick.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Quick.xcframework; path = Carthage/Build/Quick.xcframework; sourceTree = "<group>"; };
5F0068E21B3B46240048928E /* JWTDecode.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = JWTDecode.framework; sourceTree = BUILT_PRODUCTS_DIR; };
5F0068E61B3B46240048928E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
5F0068ED1B3B46240048928E /* JWTDecode-iOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "JWTDecode-iOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
5F0068F31B3B46240048928E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
5F0069021B3B511F0048928E /* JWTDecode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JWTDecode.swift; sourceTree = "<group>"; };
5F0069091B3B532E0048928E /* JWTDecode.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = JWTDecode.framework; sourceTree = BUILT_PRODUCTS_DIR; };
5F0069131B3B532E0048928E /* JWTDecode-macOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "JWTDecode-macOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
5F2496A31D64A91300A1C6E2 /* Cartfile.resolved */ = {isa = PBXFileReference; lastKnownFileType = text; path = Cartfile.resolved; sourceTree = "<group>"; };
5F2496A41D64A91300A1C6E2 /* JWTDecode.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; path = JWTDecode.podspec; sourceTree = "<group>"; };
5F2496A51D64A91300A1C6E2 /* .gitignore */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitignore; sourceTree = "<group>"; };
5F2496A61D64A91300A1C6E2 /* Cartfile.private */ = {isa = PBXFileReference; lastKnownFileType = text; path = Cartfile.private; sourceTree = "<group>"; };
5F2496A71D64A91300A1C6E2 /* Gemfile */ = {isa = PBXFileReference; lastKnownFileType = text; path = Gemfile; sourceTree = "<group>"; };
5F2496A81D64A91300A1C6E2 /* Gemfile.lock */ = {isa = PBXFileReference; lastKnownFileType = text; path = Gemfile.lock; sourceTree = "<group>"; };
5F2496AA1D64A91300A1C6E2 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
5F2496AB1D64A91300A1C6E2 /* CHANGELOG.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = CHANGELOG.md; sourceTree = "<group>"; };
5F2496AC1D64A91300A1C6E2 /* LICENSE */ = {isa = PBXFileReference; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; };
5F2496AD1D64B88900A1C6E2 /* codecov.yml */ = {isa = PBXFileReference; lastKnownFileType = text; path = codecov.yml; sourceTree = "<group>"; };
5F2614CD1C05FDDE0068DE71 /* Quick.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Quick.framework; path = Carthage/Build/iOS/Quick.framework; sourceTree = SOURCE_ROOT; };
5F2614CE1C05FDDE0068DE71 /* Nimble.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Nimble.framework; path = Carthage/Build/iOS/Nimble.framework; sourceTree = SOURCE_ROOT; };
5F2614D41C05FE720068DE71 /* Quick.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Quick.framework; path = Carthage/Build/Mac/Quick.framework; sourceTree = SOURCE_ROOT; };
5F2614D51C05FE720068DE71 /* Nimble.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Nimble.framework; path = Carthage/Build/Mac/Nimble.framework; sourceTree = SOURCE_ROOT; };
5FE49DCC1BA0D5F700DE57D3 /* JWT.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JWT.swift; sourceTree = "<group>"; };
5FE49DCF1BA0D66F00DE57D3 /* JWTDecodeError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JWTDecodeError.swift; sourceTree = "<group>"; };
918A8E5B1D63D2E1001F787B /* JWTDecode.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = JWTDecode.framework; sourceTree = BUILT_PRODUCTS_DIR; };
918A8E6C1D63D4E5001F787B /* JWTDecode-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "JWTDecode-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
918A8E7A1D63D86E001F787B /* Nimble.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Nimble.framework; path = Carthage/Build/tvOS/Nimble.framework; sourceTree = SOURCE_ROOT; };
918A8E7B1D63D86E001F787B /* Quick.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Quick.framework; path = Carthage/Build/tvOS/Quick.framework; sourceTree = SOURCE_ROOT; };
E390BAE22288E6AF00780D6C /* JWTDecode.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = JWTDecode.framework; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */

Expand All @@ -150,8 +92,6 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
5CE9C9FB26FC1E8F005A75FA /* Nimble.xcframework in Frameworks */,
5CE9C9FC26FC1E8F005A75FA /* Quick.xcframework in Frameworks */,
5CE9CA0C26FC22F8005A75FA /* JWTDecode.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -167,8 +107,6 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
5CE9CA0326FC1FF5005A75FA /* Nimble.xcframework in Frameworks */,
5CE9CA0426FC1FF5005A75FA /* Quick.xcframework in Frameworks */,
5CE9CA0D26FC23B1005A75FA /* JWTDecode.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -184,8 +122,6 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
5CE9CA0726FC2009005A75FA /* Nimble.xcframework in Frameworks */,
5CE9CA0826FC2009005A75FA /* Quick.xcframework in Frameworks */,
5CE9CA0E26FC23B8005A75FA /* JWTDecode.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -200,15 +136,6 @@
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
57F02C0B237ED39800D45E14 /* Frameworks */ = {
isa = PBXGroup;
children = (
5CE9C9F926FC1E8F005A75FA /* Nimble.xcframework */,
5CE9C9FA26FC1E8F005A75FA /* Quick.xcframework */,
);
name = Frameworks;
sourceTree = "<group>";
};
5F0068D81B3B46240048928E = {
isa = PBXGroup;
children = (
Expand All @@ -217,7 +144,6 @@
5F0068F11B3B46240048928E /* JWTDecodeTests */,
5F0068E31B3B46240048928E /* Products */,
5F2496A11D64A8EE00A1C6E2 /* Supporting Files */,
57F02C0B237ED39800D45E14 /* Frameworks */,
);
sourceTree = "<group>";
};
Expand Down Expand Up @@ -267,7 +193,6 @@
5F0068F21B3B46240048928E /* Supporting Files */ = {
isa = PBXGroup;
children = (
5F2614D11C05FE0A0068DE71 /* Frameworks */,
5F0068F31B3B46240048928E /* Info.plist */,
);
name = "Supporting Files";
Expand All @@ -277,10 +202,8 @@
isa = PBXGroup;
children = (
5F2496AD1D64B88900A1C6E2 /* codecov.yml */,
5F2496A31D64A91300A1C6E2 /* Cartfile.resolved */,
5F2496A41D64A91300A1C6E2 /* JWTDecode.podspec */,
5F2496A51D64A91300A1C6E2 /* .gitignore */,
5F2496A61D64A91300A1C6E2 /* Cartfile.private */,
5F2496A71D64A91300A1C6E2 /* Gemfile */,
5F2496A81D64A91300A1C6E2 /* Gemfile.lock */,
5F2496AA1D64A91300A1C6E2 /* README.md */,
Expand All @@ -290,43 +213,6 @@
name = "Supporting Files";
sourceTree = "<group>";
};
5F2614D11C05FE0A0068DE71 /* Frameworks */ = {
isa = PBXGroup;
children = (
5F2614D31C05FE1B0068DE71 /* OSX */,
5F2614D21C05FE160068DE71 /* iOS */,
918A8E791D63D84A001F787B /* tvOS */,
);
name = Frameworks;
sourceTree = "<group>";
};
5F2614D21C05FE160068DE71 /* iOS */ = {
isa = PBXGroup;
children = (
5F2614CD1C05FDDE0068DE71 /* Quick.framework */,
5F2614CE1C05FDDE0068DE71 /* Nimble.framework */,
);
name = iOS;
sourceTree = "<group>";
};
5F2614D31C05FE1B0068DE71 /* OSX */ = {
isa = PBXGroup;
children = (
5F2614D41C05FE720068DE71 /* Quick.framework */,
5F2614D51C05FE720068DE71 /* Nimble.framework */,
);
name = OSX;
sourceTree = "<group>";
};
918A8E791D63D84A001F787B /* tvOS */ = {
isa = PBXGroup;
children = (
918A8E7A1D63D86E001F787B /* Nimble.framework */,
918A8E7B1D63D86E001F787B /* Quick.framework */,
);
name = tvOS;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXHeadersBuildPhase section */
Expand Down Expand Up @@ -387,7 +273,6 @@
5F0068E91B3B46240048928E /* Sources */,
5F0068EA1B3B46240048928E /* Frameworks */,
5F0068EB1B3B46240048928E /* Resources */,
5F2614DC1C05FEAD0068DE71 /* CopyFiles */,
);
buildRules = (
);
Expand Down Expand Up @@ -425,7 +310,6 @@
5F00690F1B3B532E0048928E /* Sources */,
5F0069101B3B532E0048928E /* Frameworks */,
5F0069111B3B532E0048928E /* Resources */,
5F2614DF1C05FEDA0068DE71 /* CopyFiles */,
);
buildRules = (
);
Expand Down Expand Up @@ -463,7 +347,6 @@
918A8E681D63D4E5001F787B /* Sources */,
918A8E691D63D4E5001F787B /* Frameworks */,
918A8E6A1D63D4E5001F787B /* Resources */,
918A8E801D63DB37001F787B /* CopyFiles */,
);
buildRules = (
);
Expand Down
Loading

0 comments on commit 45d4ae3

Please sign in to comment.