Skip to content

Commit b5eb8f2

Browse files
Split building and testing stages in CI.
Add carthage job to CI.
1 parent c0ffc79 commit b5eb8f2

File tree

2 files changed

+39
-4
lines changed

2 files changed

+39
-4
lines changed

.github/workflows/ci.yml

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,22 @@ concurrency:
2121
group: ci
2222
cancel-in-progress: true
2323
jobs:
24-
SPM:
24+
spm:
2525
name: Swift Package Manager 5.4
2626
runs-on: macOS-11
27+
env:
28+
DEVELOPER_DIR: /Applications/Xcode_12.5.1.app/Contents/Developer
29+
steps:
30+
- uses: actions/checkout@v2
31+
- name: Resolve dependencies
32+
run: swift package resolve
33+
- name: Build
34+
run: swift build --build-tests
35+
- name: Run local tests
36+
run: swift test --skip-build -c debug --filter localTests
37+
carthage:
38+
name: Carthage
39+
runs-on: macOS-11
2740
env:
2841
DEVELOPER_DIR: /Applications/Xcode_12.5.1.app/Contents/Developer
2942
strategy:
@@ -34,6 +47,27 @@ jobs:
3447
steps:
3548
- uses: actions/checkout@v2
3649
- name: Resolve dependencies
37-
run: swift package resolve
38-
- name: Run local test
39-
run: swift test --filter localTests
50+
run: carthage checkout
51+
- name: Build
52+
run: carthage update --platform iOS --use-xcframeworks
53+
# - name: Run local tests
54+
# run:
55+
# pods:
56+
# name: CocoaPods
57+
# runs-on: macOS-11
58+
# env:
59+
# DEVELOPER_DIR: /Applications/Xcode_12.5.1.app/Contents/Developer
60+
# strategy:
61+
# fail-fast: false
62+
# max-parallel: 2
63+
# matrix:
64+
# destination: ['OS=14.5,name=iPhone 12']
65+
# steps:
66+
# - uses: actions/checkout@v2
67+
# - name: Resolve dependencies
68+
# run: swift package resolve
69+
# - name: Build
70+
# run: swift build --build-tests
71+
# - name: Run local tests
72+
# run: swift test --skip-build -c debug --filter localTests
73+
#

Tests/web3swiftTests/local_tests/web3swift_numberFormattingUtil_Tests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ class web3swift_numberFormattingUtil_Tests: XCTestCase {
1414

1515
func testNumberFormattingUtil() throws {
1616
let balance = BigInt("-1000000000000000000")
17+
print("this is print")
1718
let formatted = Web3.Utils.formatToPrecision(balance, numberDecimals: 18, formattingDecimals: 4, decimalSeparator: ",")
1819
XCTAssert(formatted == "-1")
1920
}

0 commit comments

Comments
 (0)