Skip to content

Commit 0100694

Browse files
authored
Merge pull request #422 from skywinder/github-actions
2 parents 8bf2b26 + a5f4e69 commit 0100694

17 files changed

+570
-423
lines changed

.circleci/config.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: "Web3swift CI"
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- develop
8+
- hotfix
9+
- github-actions
10+
paths:
11+
- Sources/**
12+
- 'Tests/**'
13+
- 'web3swift*/**'
14+
- '.github/workflows/**'
15+
pull_request:
16+
branches:
17+
- master
18+
- develop
19+
20+
jobs:
21+
spm:
22+
name: Swift Package Manager 5.4
23+
runs-on: macOS-11
24+
concurrency: spm
25+
env:
26+
DEVELOPER_DIR: /Applications/Xcode_12.5.1.app/Contents/Developer
27+
steps:
28+
- uses: actions/checkout@v2
29+
- name: Resolve dependencies
30+
run: swift package resolve
31+
- name: Build
32+
run: swift build --build-tests
33+
# - name: Run local tests
34+
# run: swift test --skip-build -c debug --filter localTests
35+
carthage:
36+
name: Carthage
37+
runs-on: macOS-11
38+
concurrency: carthage
39+
env:
40+
DEVELOPER_DIR: /Applications/Xcode_12.5.1.app/Contents/Developer
41+
strategy:
42+
fail-fast: false
43+
max-parallel: 2
44+
matrix:
45+
destination: ['OS=14.5,name=iPhone 12']
46+
steps:
47+
- uses: actions/checkout@v2
48+
- name: Resolving dependencies
49+
run: carthage checkout
50+
- name: Building dependencies
51+
run: carthage build --no-use-binaries --platform iOS Simulator --use-xcframeworks
52+
- name: Building framework
53+
run: xcodebuild build-for-testing -project "web3swift.xcodeproj" -scheme "web3swift" -destination "${{matrix.destination}}" -testPlan LocalTests
54+
# - name: Running local tests
55+
# run: xcodebuild test-without-building -project "web3swift.xcodeproj" -scheme "web3swift" -destination "${{matrix.destination}}" -testPlan LocalTests

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
## Build generated
66
build/
77
DerivedData/
8-
.build
8+
99
## Various settings
1010
*.pbxuser
1111
!default.pbxuser
@@ -38,6 +38,8 @@ playground.xcworkspace
3838
Packages/
3939
Package.pins
4040
.build/
41+
.swiftpm/**
42+
*/.swiftpm/**
4143

4244
# CocoaPods
4345
#

.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

Lines changed: 0 additions & 7 deletions
This file was deleted.

.travis.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

Package.swift

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,20 @@ let excludeFiles: String = []
1515
let package = Package(
1616
name: "Web3swift",
1717
platforms: [
18-
.macOS(.v10_12), .iOS(.v11),
18+
.macOS(.v10_12), .iOS(.v11)
1919
],
2020
products: [
21-
.library(name: "web3swift", targets: ["web3swift"]),
21+
.library(name: "web3swift", targets: ["web3swift"])
2222
],
2323

2424
dependencies: [
2525
.package(url: "https://github.com/attaswift/BigInt.git", from: "5.3.0"),
2626
.package(url: "https://github.com/mxcl/PromiseKit.git", from: "6.15.4"),
2727
.package(url: "https://github.com/daltoniam/Starscream.git", from: "4.0.4"),
28-
.package(url: "https://github.com/krzyzanowskim/CryptoSwift.git", from: "1.4.2"),
28+
.package(url: "https://github.com/krzyzanowskim/CryptoSwift.git", from: "1.4.2")
2929
],
3030
targets: [
3131
.target(name: "secp256k1"),
32-
3332
.target(
3433
name: "web3swift",
3534
dependencies: ["BigInt", "secp256k1", "PromiseKit", "Starscream", "CryptoSwift"],
@@ -41,7 +40,26 @@ let package = Package(
4140
]
4241
),
4342
.testTarget(
44-
name: "web3swiftTests",
45-
dependencies: ["web3swift"]),
43+
name: "localTests",
44+
dependencies: ["web3swift"],
45+
path: "Tests/web3swiftTests/local_tests",
46+
resources: [
47+
.copy("../../../TestToken/Helpers/SafeMath/SafeMath.sol"),
48+
.copy("../../../TestToken/Helpers/TokenBasics/ERC20.sol"),
49+
.copy("../../../TestToken/Helpers/TokenBasics/IERC20.sol"),
50+
.copy("../../../TestToken/Token/Web3SwiftToken.sol")
51+
]
52+
),
53+
.testTarget(
54+
name: "remoteTests",
55+
dependencies: ["web3swift"],
56+
path: "Tests/web3swiftTests/infura_tests",
57+
resources: [
58+
.copy("../../../TestToken/Helpers/SafeMath/SafeMath.sol"),
59+
.copy("../../../TestToken/Helpers/TokenBasics/ERC20.sol"),
60+
.copy("../../../TestToken/Helpers/TokenBasics/IERC20.sol"),
61+
.copy("../../../TestToken/Token/Web3SwiftToken.sol")
62+
]
63+
),
4664
]
4765
)
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"configurations" : [
3+
{
4+
"id" : "66042A4A-495F-4753-9DC9-F717EBB059FD",
5+
"name" : "Configuration 1",
6+
"options" : {
7+
8+
}
9+
}
10+
],
11+
"defaultOptions" : {
12+
13+
},
14+
"testTargets" : [
15+
{
16+
"skippedTests" : [
17+
"EIP712Tests",
18+
"web3swift_AdvancedABIv2_Tests",
19+
"web3swift_EIP67_Tests",
20+
"web3swift_EIP681_Tests",
21+
"web3swift_ENS_Tests",
22+
"web3swift_ERC20_Class_Tests",
23+
"web3swift_Eventloop_Tests",
24+
"web3swift_RLP_Tests",
25+
"web3swift_Tests",
26+
"web3swift_User_cases",
27+
"web3swift_basic_local_node_Tests",
28+
"web3swift_numberFormattingUtil_Tests",
29+
"web3swift_personalSignature_Tests",
30+
"web3swift_promises_Tests",
31+
"web3swift_transactions_Tests"
32+
],
33+
"target" : {
34+
"containerPath" : "container:web3swift.xcodeproj",
35+
"identifier" : "139751B6219AF76D0044D2B0",
36+
"name" : "Tests"
37+
}
38+
}
39+
],
40+
"version" : 1
41+
}

0 commit comments

Comments
 (0)