Skip to content

Commit 45d4ae3

Browse files
authored
test: migrated from Quick & Nimble to use XCTest to remove dependency on third party packages (#232)
2 parents 9718c7e + 57660ed commit 45d4ae3

File tree

6 files changed

+387
-460
lines changed

6 files changed

+387
-460
lines changed

.github/actions/test/action.yml

-12
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,6 @@ runs:
2424
run: xcodebuild -version | tee .xcode-version
2525
shell: bash
2626

27-
- id: restore-carthage-cache
28-
name: Restore Carthage cache
29-
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84
30-
with:
31-
path: Carthage
32-
key: carthage-${{ inputs.platform }}-${{ hashFiles('Cartfile.resolved') }}-${{ hashFiles('.xcode-version') }}-v1
33-
34-
- name: Install dependencies
35-
if: steps.restore-carthage-cache.outputs.cache-hit != 'true'
36-
run: carthage bootstrap --platform ${{ inputs.platform }} --use-xcframeworks --no-use-binaries --cache-builds
37-
shell: bash
38-
3927
- name: Run tests
4028
uses: mxcl/xcodebuild@6e60022a0cbe8c89278be2dd1773a2f68e7c5c87
4129
with:

CONTRIBUTING.md

+1-4
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,5 @@
55
66
## Environment setup
77

8-
We use [Carthage](https://github.com/Carthage/Carthage) to manage JWTDecode.swift's dependencies.
9-
108
1. Clone this repository and enter its root directory.
11-
2. Run `carthage bootstrap --use-xcframeworks` to fetch and build the dependencies.
12-
3. Open `JWTDecode.xcodeproj` in Xcode.
9+
2. Open `JWTDecode.xcodeproj` in Xcode.

Cartfile.private

-2
This file was deleted.

Cartfile.resolved

-2
This file was deleted.

JWTDecode.xcodeproj/project.pbxproj

-117
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,6 @@
1414
5C1B5D8B238711A60076E46B /* JWTHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57EA5A04237EBBCB00264C01 /* JWTHelper.swift */; };
1515
5C1B5D8D238711B10076E46B /* JWTDecodeSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57EA5A02237EBBCA00264C01 /* JWTDecodeSpec.swift */; };
1616
5C1B5D8E238711B30076E46B /* JWTHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57EA5A04237EBBCB00264C01 /* JWTHelper.swift */; };
17-
5CE9C9FB26FC1E8F005A75FA /* Nimble.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5CE9C9F926FC1E8F005A75FA /* Nimble.xcframework */; };
18-
5CE9C9FC26FC1E8F005A75FA /* Quick.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5CE9C9FA26FC1E8F005A75FA /* Quick.xcframework */; };
19-
5CE9CA0126FC1ED3005A75FA /* Nimble.xcframework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 5CE9C9F926FC1E8F005A75FA /* Nimble.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
20-
5CE9CA0226FC1ED5005A75FA /* Quick.xcframework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 5CE9C9FA26FC1E8F005A75FA /* Quick.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
21-
5CE9CA0326FC1FF5005A75FA /* Nimble.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5CE9C9F926FC1E8F005A75FA /* Nimble.xcframework */; };
22-
5CE9CA0426FC1FF5005A75FA /* Quick.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5CE9C9FA26FC1E8F005A75FA /* Quick.xcframework */; };
23-
5CE9CA0526FC1FFB005A75FA /* Nimble.xcframework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 5CE9C9F926FC1E8F005A75FA /* Nimble.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
24-
5CE9CA0626FC1FFB005A75FA /* Quick.xcframework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 5CE9C9FA26FC1E8F005A75FA /* Quick.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
25-
5CE9CA0726FC2009005A75FA /* Nimble.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5CE9C9F926FC1E8F005A75FA /* Nimble.xcframework */; };
26-
5CE9CA0826FC2009005A75FA /* Quick.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5CE9C9FA26FC1E8F005A75FA /* Quick.xcframework */; };
27-
5CE9CA0926FC200D005A75FA /* Nimble.xcframework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 5CE9C9F926FC1E8F005A75FA /* Nimble.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
28-
5CE9CA0A26FC200D005A75FA /* Quick.xcframework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 5CE9C9FA26FC1E8F005A75FA /* Quick.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
2917
5CE9CA0C26FC22F8005A75FA /* JWTDecode.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5F0068E21B3B46240048928E /* JWTDecode.framework */; };
3018
5CE9CA0D26FC23B1005A75FA /* JWTDecode.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5F0069091B3B532E0048928E /* JWTDecode.framework */; };
3119
5CE9CA0E26FC23B8005A75FA /* JWTDecode.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 918A8E5B1D63D2E1001F787B /* JWTDecode.framework */; };
@@ -66,75 +54,29 @@
6654
};
6755
/* End PBXContainerItemProxy section */
6856

69-
/* Begin PBXCopyFilesBuildPhase section */
70-
5F2614DC1C05FEAD0068DE71 /* CopyFiles */ = {
71-
isa = PBXCopyFilesBuildPhase;
72-
buildActionMask = 2147483647;
73-
dstPath = "";
74-
dstSubfolderSpec = 10;
75-
files = (
76-
5CE9CA0126FC1ED3005A75FA /* Nimble.xcframework in CopyFiles */,
77-
5CE9CA0226FC1ED5005A75FA /* Quick.xcframework in CopyFiles */,
78-
);
79-
runOnlyForDeploymentPostprocessing = 0;
80-
};
81-
5F2614DF1C05FEDA0068DE71 /* CopyFiles */ = {
82-
isa = PBXCopyFilesBuildPhase;
83-
buildActionMask = 2147483647;
84-
dstPath = "";
85-
dstSubfolderSpec = 10;
86-
files = (
87-
5CE9CA0526FC1FFB005A75FA /* Nimble.xcframework in CopyFiles */,
88-
5CE9CA0626FC1FFB005A75FA /* Quick.xcframework in CopyFiles */,
89-
);
90-
runOnlyForDeploymentPostprocessing = 0;
91-
};
92-
918A8E801D63DB37001F787B /* CopyFiles */ = {
93-
isa = PBXCopyFilesBuildPhase;
94-
buildActionMask = 2147483647;
95-
dstPath = "";
96-
dstSubfolderSpec = 10;
97-
files = (
98-
5CE9CA0926FC200D005A75FA /* Nimble.xcframework in CopyFiles */,
99-
5CE9CA0A26FC200D005A75FA /* Quick.xcframework in CopyFiles */,
100-
);
101-
runOnlyForDeploymentPostprocessing = 0;
102-
};
103-
/* End PBXCopyFilesBuildPhase section */
104-
10557
/* Begin PBXFileReference section */
10658
57EA5A02237EBBCA00264C01 /* JWTDecodeSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JWTDecodeSpec.swift; path = JWTDecodeTests/JWTDecodeSpec.swift; sourceTree = SOURCE_ROOT; };
10759
57EA5A04237EBBCB00264C01 /* JWTHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JWTHelper.swift; path = JWTDecodeTests/JWTHelper.swift; sourceTree = SOURCE_ROOT; };
10860
5CDF405828517BE2003840E6 /* JWTDecode.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; path = JWTDecode.playground; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
109-
5CE9C9F926FC1E8F005A75FA /* Nimble.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Nimble.xcframework; path = Carthage/Build/Nimble.xcframework; sourceTree = "<group>"; };
110-
5CE9C9FA26FC1E8F005A75FA /* Quick.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Quick.xcframework; path = Carthage/Build/Quick.xcframework; sourceTree = "<group>"; };
11161
5F0068E21B3B46240048928E /* JWTDecode.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = JWTDecode.framework; sourceTree = BUILT_PRODUCTS_DIR; };
11262
5F0068E61B3B46240048928E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
11363
5F0068ED1B3B46240048928E /* JWTDecode-iOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "JWTDecode-iOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
11464
5F0068F31B3B46240048928E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
11565
5F0069021B3B511F0048928E /* JWTDecode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JWTDecode.swift; sourceTree = "<group>"; };
11666
5F0069091B3B532E0048928E /* JWTDecode.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = JWTDecode.framework; sourceTree = BUILT_PRODUCTS_DIR; };
11767
5F0069131B3B532E0048928E /* JWTDecode-macOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "JWTDecode-macOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
118-
5F2496A31D64A91300A1C6E2 /* Cartfile.resolved */ = {isa = PBXFileReference; lastKnownFileType = text; path = Cartfile.resolved; sourceTree = "<group>"; };
11968
5F2496A41D64A91300A1C6E2 /* JWTDecode.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; path = JWTDecode.podspec; sourceTree = "<group>"; };
12069
5F2496A51D64A91300A1C6E2 /* .gitignore */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitignore; sourceTree = "<group>"; };
121-
5F2496A61D64A91300A1C6E2 /* Cartfile.private */ = {isa = PBXFileReference; lastKnownFileType = text; path = Cartfile.private; sourceTree = "<group>"; };
12270
5F2496A71D64A91300A1C6E2 /* Gemfile */ = {isa = PBXFileReference; lastKnownFileType = text; path = Gemfile; sourceTree = "<group>"; };
12371
5F2496A81D64A91300A1C6E2 /* Gemfile.lock */ = {isa = PBXFileReference; lastKnownFileType = text; path = Gemfile.lock; sourceTree = "<group>"; };
12472
5F2496AA1D64A91300A1C6E2 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
12573
5F2496AB1D64A91300A1C6E2 /* CHANGELOG.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = CHANGELOG.md; sourceTree = "<group>"; };
12674
5F2496AC1D64A91300A1C6E2 /* LICENSE */ = {isa = PBXFileReference; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; };
12775
5F2496AD1D64B88900A1C6E2 /* codecov.yml */ = {isa = PBXFileReference; lastKnownFileType = text; path = codecov.yml; sourceTree = "<group>"; };
128-
5F2614CD1C05FDDE0068DE71 /* Quick.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Quick.framework; path = Carthage/Build/iOS/Quick.framework; sourceTree = SOURCE_ROOT; };
129-
5F2614CE1C05FDDE0068DE71 /* Nimble.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Nimble.framework; path = Carthage/Build/iOS/Nimble.framework; sourceTree = SOURCE_ROOT; };
130-
5F2614D41C05FE720068DE71 /* Quick.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Quick.framework; path = Carthage/Build/Mac/Quick.framework; sourceTree = SOURCE_ROOT; };
131-
5F2614D51C05FE720068DE71 /* Nimble.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Nimble.framework; path = Carthage/Build/Mac/Nimble.framework; sourceTree = SOURCE_ROOT; };
13276
5FE49DCC1BA0D5F700DE57D3 /* JWT.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JWT.swift; sourceTree = "<group>"; };
13377
5FE49DCF1BA0D66F00DE57D3 /* JWTDecodeError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JWTDecodeError.swift; sourceTree = "<group>"; };
13478
918A8E5B1D63D2E1001F787B /* JWTDecode.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = JWTDecode.framework; sourceTree = BUILT_PRODUCTS_DIR; };
13579
918A8E6C1D63D4E5001F787B /* JWTDecode-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "JWTDecode-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
136-
918A8E7A1D63D86E001F787B /* Nimble.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Nimble.framework; path = Carthage/Build/tvOS/Nimble.framework; sourceTree = SOURCE_ROOT; };
137-
918A8E7B1D63D86E001F787B /* Quick.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Quick.framework; path = Carthage/Build/tvOS/Quick.framework; sourceTree = SOURCE_ROOT; };
13880
E390BAE22288E6AF00780D6C /* JWTDecode.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = JWTDecode.framework; sourceTree = BUILT_PRODUCTS_DIR; };
13981
/* End PBXFileReference section */
14082

@@ -150,8 +92,6 @@
15092
isa = PBXFrameworksBuildPhase;
15193
buildActionMask = 2147483647;
15294
files = (
153-
5CE9C9FB26FC1E8F005A75FA /* Nimble.xcframework in Frameworks */,
154-
5CE9C9FC26FC1E8F005A75FA /* Quick.xcframework in Frameworks */,
15595
5CE9CA0C26FC22F8005A75FA /* JWTDecode.framework in Frameworks */,
15696
);
15797
runOnlyForDeploymentPostprocessing = 0;
@@ -167,8 +107,6 @@
167107
isa = PBXFrameworksBuildPhase;
168108
buildActionMask = 2147483647;
169109
files = (
170-
5CE9CA0326FC1FF5005A75FA /* Nimble.xcframework in Frameworks */,
171-
5CE9CA0426FC1FF5005A75FA /* Quick.xcframework in Frameworks */,
172110
5CE9CA0D26FC23B1005A75FA /* JWTDecode.framework in Frameworks */,
173111
);
174112
runOnlyForDeploymentPostprocessing = 0;
@@ -184,8 +122,6 @@
184122
isa = PBXFrameworksBuildPhase;
185123
buildActionMask = 2147483647;
186124
files = (
187-
5CE9CA0726FC2009005A75FA /* Nimble.xcframework in Frameworks */,
188-
5CE9CA0826FC2009005A75FA /* Quick.xcframework in Frameworks */,
189125
5CE9CA0E26FC23B8005A75FA /* JWTDecode.framework in Frameworks */,
190126
);
191127
runOnlyForDeploymentPostprocessing = 0;
@@ -200,15 +136,6 @@
200136
/* End PBXFrameworksBuildPhase section */
201137

202138
/* Begin PBXGroup section */
203-
57F02C0B237ED39800D45E14 /* Frameworks */ = {
204-
isa = PBXGroup;
205-
children = (
206-
5CE9C9F926FC1E8F005A75FA /* Nimble.xcframework */,
207-
5CE9C9FA26FC1E8F005A75FA /* Quick.xcframework */,
208-
);
209-
name = Frameworks;
210-
sourceTree = "<group>";
211-
};
212139
5F0068D81B3B46240048928E = {
213140
isa = PBXGroup;
214141
children = (
@@ -217,7 +144,6 @@
217144
5F0068F11B3B46240048928E /* JWTDecodeTests */,
218145
5F0068E31B3B46240048928E /* Products */,
219146
5F2496A11D64A8EE00A1C6E2 /* Supporting Files */,
220-
57F02C0B237ED39800D45E14 /* Frameworks */,
221147
);
222148
sourceTree = "<group>";
223149
};
@@ -267,7 +193,6 @@
267193
5F0068F21B3B46240048928E /* Supporting Files */ = {
268194
isa = PBXGroup;
269195
children = (
270-
5F2614D11C05FE0A0068DE71 /* Frameworks */,
271196
5F0068F31B3B46240048928E /* Info.plist */,
272197
);
273198
name = "Supporting Files";
@@ -277,10 +202,8 @@
277202
isa = PBXGroup;
278203
children = (
279204
5F2496AD1D64B88900A1C6E2 /* codecov.yml */,
280-
5F2496A31D64A91300A1C6E2 /* Cartfile.resolved */,
281205
5F2496A41D64A91300A1C6E2 /* JWTDecode.podspec */,
282206
5F2496A51D64A91300A1C6E2 /* .gitignore */,
283-
5F2496A61D64A91300A1C6E2 /* Cartfile.private */,
284207
5F2496A71D64A91300A1C6E2 /* Gemfile */,
285208
5F2496A81D64A91300A1C6E2 /* Gemfile.lock */,
286209
5F2496AA1D64A91300A1C6E2 /* README.md */,
@@ -290,43 +213,6 @@
290213
name = "Supporting Files";
291214
sourceTree = "<group>";
292215
};
293-
5F2614D11C05FE0A0068DE71 /* Frameworks */ = {
294-
isa = PBXGroup;
295-
children = (
296-
5F2614D31C05FE1B0068DE71 /* OSX */,
297-
5F2614D21C05FE160068DE71 /* iOS */,
298-
918A8E791D63D84A001F787B /* tvOS */,
299-
);
300-
name = Frameworks;
301-
sourceTree = "<group>";
302-
};
303-
5F2614D21C05FE160068DE71 /* iOS */ = {
304-
isa = PBXGroup;
305-
children = (
306-
5F2614CD1C05FDDE0068DE71 /* Quick.framework */,
307-
5F2614CE1C05FDDE0068DE71 /* Nimble.framework */,
308-
);
309-
name = iOS;
310-
sourceTree = "<group>";
311-
};
312-
5F2614D31C05FE1B0068DE71 /* OSX */ = {
313-
isa = PBXGroup;
314-
children = (
315-
5F2614D41C05FE720068DE71 /* Quick.framework */,
316-
5F2614D51C05FE720068DE71 /* Nimble.framework */,
317-
);
318-
name = OSX;
319-
sourceTree = "<group>";
320-
};
321-
918A8E791D63D84A001F787B /* tvOS */ = {
322-
isa = PBXGroup;
323-
children = (
324-
918A8E7A1D63D86E001F787B /* Nimble.framework */,
325-
918A8E7B1D63D86E001F787B /* Quick.framework */,
326-
);
327-
name = tvOS;
328-
sourceTree = "<group>";
329-
};
330216
/* End PBXGroup section */
331217

332218
/* Begin PBXHeadersBuildPhase section */
@@ -387,7 +273,6 @@
387273
5F0068E91B3B46240048928E /* Sources */,
388274
5F0068EA1B3B46240048928E /* Frameworks */,
389275
5F0068EB1B3B46240048928E /* Resources */,
390-
5F2614DC1C05FEAD0068DE71 /* CopyFiles */,
391276
);
392277
buildRules = (
393278
);
@@ -425,7 +310,6 @@
425310
5F00690F1B3B532E0048928E /* Sources */,
426311
5F0069101B3B532E0048928E /* Frameworks */,
427312
5F0069111B3B532E0048928E /* Resources */,
428-
5F2614DF1C05FEDA0068DE71 /* CopyFiles */,
429313
);
430314
buildRules = (
431315
);
@@ -463,7 +347,6 @@
463347
918A8E681D63D4E5001F787B /* Sources */,
464348
918A8E691D63D4E5001F787B /* Frameworks */,
465349
918A8E6A1D63D4E5001F787B /* Resources */,
466-
918A8E801D63DB37001F787B /* CopyFiles */,
467350
);
468351
buildRules = (
469352
);

0 commit comments

Comments
 (0)