Skip to content

Commit

Permalink
CATTY-731 Move Unit Tests to Github Runners
Browse files Browse the repository at this point in the history
  • Loading branch information
wallisch committed Oct 14, 2024
1 parent 72f2f2e commit 28862b8
Show file tree
Hide file tree
Showing 12 changed files with 198 additions and 190 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/scheduled-upload-crowdin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ on:

jobs:
CrowdinUpload:
runs-on: macos-latest
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: develop
- name: Setup Ruby
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: unit-test

on:
pull_request:

jobs:
UnitTest:
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: 15
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
working-directory: src
bundler-cache: true
- name: Test
run: cd src && bundle exec fastlane ios unittests
#- name: Display Test Results
# uses: test-summary/action@v2
# if: always()
# with:
# paths: "src/fastlane/test_output/report.junit"
#- name: Test Report
# uses: dorny/test-reporter@v1
# if: always()
# with:
# name: Unit Tests
# path: src/fastlane/test_output/report.junit
# reporter: jest-junit
#- name: Test Report
# uses: mikepenz/action-junit-report@v4
# if: success() || failure() # always run even if the previous step fails
# with:
# report_paths: 'src/fastlane/test_output/report.junit'
- name: Report
uses: kishikawakatsumi/xcresulttool@v1
if: always()
with:
path: src/fastlane/test_output/Tests.xcresult
2 changes: 1 addition & 1 deletion src/.ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.3.0
3.3.5
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,6 @@
"identifier" : "CA7698A91B0E4A97000D0340",
"name" : "CattyTests"
}
},
{
"parallelizable" : true,
"target" : {
"containerPath" : "container:Catty.xcodeproj",
"identifier" : "AAADA0031B9B29D500E0CA9A",
"name" : "CattyUITests"
}
}
],
"version" : 1
Expand Down
42 changes: 42 additions & 0 deletions src/Catty.xcodeproj/UITests.xctestplan
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"configurations" : [
{
"id" : "1C9A3BFC-D3BD-40C9-B224-A0EBD3A4FDBF",
"name" : "Fastlane",
"options" : {
"diagnosticCollectionPolicy" : "Never",
"mainThreadCheckerEnabled" : false,
"maximumTestRepetitions" : 3,
"testRepetitionMode" : "retryOnFailure",
"uiTestingScreenshotsLifetime" : "keepNever",
"userAttachmentLifetime" : "keepNever"
}
}
],
"defaultOptions" : {
"codeCoverage" : false,
"environmentVariableEntries" : [
{
"enabled" : false,
"key" : "OS_ACTIVITY_MODE",
"value" : "disable"
}
],
"targetForVariableExpansion" : {
"containerPath" : "container:Catty.xcodeproj",
"identifier" : "CADBD6D319B0E8C200C62836",
"name" : "Catty"
}
},
"testTargets" : [
{
"parallelizable" : true,
"target" : {
"containerPath" : "container:Catty.xcodeproj",
"identifier" : "AAADA0031B9B29D500E0CA9A",
"name" : "CattyUITests"
}
}
],
"version" : 1
}
6 changes: 4 additions & 2 deletions src/Catty.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2207,6 +2207,7 @@
1764E6372A06CC940013102B /* SoundRecorderViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SoundRecorderViewController.swift; sourceTree = "<group>"; };
17A8AC642644E6A900DDD480 /* ForceInit.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ForceInit.m; sourceTree = "<group>"; };
17A8AC6B2644E6B500DDD480 /* ForceInit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ForceInit.h; sourceTree = "<group>"; };
17C90C142CB74DA100303599 /* UITests.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; name = UITests.xctestplan; path = Catty.xcodeproj/UITests.xctestplan; sourceTree = "<group>"; };
17D5F5BD265E927A00C678FF /* Keychain.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = Keychain.swift; path = Keychain/Keychain.swift; sourceTree = "<group>"; };
17D5F5BF265EAEF700C678FF /* KeychainTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeychainTests.swift; sourceTree = "<group>"; };
1801591D25E4D5CE00E5B673 /* FormulaEditorSectionViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormulaEditorSectionViewController.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -3372,7 +3373,7 @@
7A7C5B407D7B4FD7DA1E1DBD /* hr */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.strings; name = hr; path = hr.lproj/Localizable.strings; sourceTree = "<group>"; };
7B014D0329E0ADE5004AA0E0 /* StoreAuthenticator.deleteUser.success.refresh.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = StoreAuthenticator.deleteUser.success.refresh.json; sourceTree = "<group>"; };
7B014D0429E0ADE5004AA0E0 /* StoreAuthenticator.deleteUser.success.upgrade.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = StoreAuthenticator.deleteUser.success.upgrade.json; sourceTree = "<group>"; };
7B014D0E29E7122E004AA0E0 /* CattyTestplan.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; name = CattyTestplan.xctestplan; path = Catty.xcodeproj/CattyTestplan.xctestplan; sourceTree = "<group>"; };
7B014D0E29E7122E004AA0E0 /* Tests.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; name = Tests.xctestplan; path = Catty.xcodeproj/Tests.xctestplan; sourceTree = "<group>"; };
7B09EB6529B1DF8200590F3D /* RegisterViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RegisterViewController.swift; sourceTree = "<group>"; };
7B09EB6629B1DF8200590F3D /* BaseAuthenticationViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BaseAuthenticationViewController.swift; sourceTree = "<group>"; };
7B09EB6729B1DF8200590F3D /* LoginViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -5045,7 +5046,8 @@
92FF32C11A24E33B00093DA7 /* Storyboard+XIB */,
29B97315FDCFA39411CA2CEA /* Supporting Files */,
B43498471927A3AB002F9075 /* Resources */,
7B014D0E29E7122E004AA0E0 /* CattyTestplan.xctestplan */,
7B014D0E29E7122E004AA0E0 /* Tests.xctestplan */,
17C90C142CB74DA100303599 /* UITests.xctestplan */,
B46B270317703F9400172837 /* CattyTests */,
AAADA0051B9B29D500E0CA9A /* CattyUITests */,
187E07A124E26CED00E652C4 /* CattyUISnapshots */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,12 @@
</MacroExpansion>
<TestPlans>
<TestPlanReference
reference = "container:Catty.xcodeproj/CattyTestplan.xctestplan"
reference = "container:Catty.xcodeproj/Tests.xctestplan"
default = "YES">
</TestPlanReference>
<TestPlanReference
reference = "container:Catty.xcodeproj/UITests.xctestplan">
</TestPlanReference>
</TestPlans>
<Testables>
<TestableReference
Expand Down
95 changes: 51 additions & 44 deletions src/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,29 +1,32 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.6)
CFPropertyList (3.0.7)
base64
nkf
rexml
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
artifactory (3.0.15)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
artifactory (3.0.17)
atomos (0.1.3)
aws-eventstream (1.3.0)
aws-partitions (1.882.0)
aws-sdk-core (3.190.3)
aws-partitions (1.990.0)
aws-sdk-core (3.209.1)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.8)
aws-sigv4 (~> 1.9)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.76.0)
aws-sdk-core (~> 3, >= 3.188.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.142.0)
aws-sdk-core (~> 3, >= 3.189.0)
aws-sdk-kms (1.94.0)
aws-sdk-core (~> 3, >= 3.207.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.167.0)
aws-sdk-core (~> 3, >= 3.207.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.8)
aws-sigv4 (1.8.0)
aws-sigv4 (~> 1.5)
aws-sigv4 (1.10.0)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
base64 (0.2.0)
claide (1.1.0)
colored (1.2)
colored2 (3.1.2)
Expand All @@ -35,8 +38,8 @@ GEM
domain_name (0.6.20240107)
dotenv (2.8.1)
emoji_regex (3.2.3)
excon (0.109.0)
faraday (1.10.3)
excon (0.112.0)
faraday (1.10.4)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
Expand All @@ -57,22 +60,22 @@ GEM
faraday-httpclient (1.0.1)
faraday-multipart (1.0.4)
multipart-post (~> 2)
faraday-net_http (1.0.1)
faraday-net_http (1.0.2)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
faraday-retry (1.0.3)
faraday_middleware (1.2.0)
faraday_middleware (1.2.1)
faraday (~> 1.0)
fastimage (2.3.0)
fastlane (2.219.0)
fastimage (2.3.1)
fastlane (2.224.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
aws-sdk-s3 (~> 1.0)
babosa (>= 1.0.3, < 2.0.0)
bundler (>= 1.12.0, < 3.0.0)
colored
colored (~> 1.2)
commander (~> 4.6)
dotenv (>= 2.1.1, < 3.0.0)
emoji_regex (>= 0.1, < 4.0)
Expand All @@ -93,10 +96,10 @@ GEM
mini_magick (>= 4.9.4, < 5.0.0)
multipart-post (>= 2.0.0, < 3.0.0)
naturally (~> 2.2)
optparse (>= 0.1.1)
optparse (>= 0.1.1, < 1.0.0)
plist (>= 3.1.0, < 4.0.0)
rubyzip (>= 2.0.0, < 3.0.0)
security (= 0.1.3)
security (= 0.1.5)
simctl (~> 1.6.3)
terminal-notifier (>= 2.0.0, < 3.0.0)
terminal-table (~> 3)
Expand All @@ -105,8 +108,8 @@ GEM
word_wrap (~> 1.0.0)
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3)
fastlane-plugin-browserstack (0.3.2)
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
fastlane-plugin-browserstack (0.3.3)
rest-client (~> 2.0, >= 2.0.2)
gh_inspector (1.1.3)
google-apis-androidpublisher_v3 (0.54.0)
Expand All @@ -125,12 +128,12 @@ GEM
google-apis-core (>= 0.11.0, < 2.a)
google-apis-storage_v1 (0.31.0)
google-apis-core (>= 0.11.0, < 2.a)
google-cloud-core (1.6.1)
google-cloud-core (1.7.1)
google-cloud-env (>= 1.0, < 3.a)
google-cloud-errors (~> 1.0)
google-cloud-env (1.6.0)
faraday (>= 0.17.3, < 3.0)
google-cloud-errors (1.3.1)
google-cloud-errors (1.4.0)
google-cloud-storage (1.47.0)
addressable (~> 2.8)
digest-crc (~> 0.4)
Expand All @@ -147,27 +150,31 @@ GEM
signet (>= 0.16, < 2.a)
highline (2.0.3)
http-accept (1.7.0)
http-cookie (1.0.5)
http-cookie (1.0.7)
domain_name (~> 0.5)
httpclient (2.8.3)
jmespath (1.6.2)
json (2.7.1)
jwt (2.7.1)
mime-types (3.5.2)
json (2.7.2)
jwt (2.9.3)
base64
logger (1.6.1)
mime-types (3.6.0)
logger
mime-types-data (~> 3.2015)
mime-types-data (3.2023.1205)
mini_magick (4.12.0)
mime-types-data (3.2024.1001)
mini_magick (4.13.2)
mini_mime (1.1.5)
multi_json (1.15.0)
multipart-post (2.3.0)
multipart-post (2.4.1)
nanaimo (0.3.0)
naturally (2.2.1)
netrc (0.11.0)
optparse (0.4.0)
nkf (0.2.0)
optparse (0.5.0)
os (1.1.4)
plist (3.7.1)
public_suffix (5.0.4)
rake (13.1.0)
public_suffix (6.0.1)
rake (13.2.1)
representable (3.2.0)
declarative (< 0.1.0)
trailblazer-option (>= 0.1.1, < 0.2.0)
Expand All @@ -178,12 +185,12 @@ GEM
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
retriable (3.1.2)
rexml (3.2.6)
rexml (3.3.8)
rouge (2.0.7)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
security (0.1.3)
signet (0.18.0)
security (0.1.5)
signet (0.19.0)
addressable (~> 2.8)
faraday (>= 0.17.5, < 3.a)
jwt (>= 1.5, < 3.0)
Expand All @@ -200,15 +207,15 @@ GEM
tty-spinner (0.9.3)
tty-cursor (~> 0.7)
uber (0.1.0)
unicode-display_width (2.5.0)
unicode-display_width (2.6.0)
word_wrap (1.0.0)
xcodeproj (1.23.0)
xcodeproj (1.25.1)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (~> 3.2.4)
rexml (>= 3.3.6, < 4.0)
xcpretty (0.3.0)
rouge (~> 2.0.7)
xcpretty-travis-formatter (1.0.1)
Expand All @@ -223,4 +230,4 @@ DEPENDENCIES
fastlane-plugin-browserstack

BUNDLED WITH
2.5.5
2.5.21
Loading

0 comments on commit 28862b8

Please sign in to comment.