Skip to content

Commit 14e270b

Browse files
First attempt of github actions.
1 parent 2871bc8 commit 14e270b

File tree

2 files changed

+52
-5
lines changed

2 files changed

+52
-5
lines changed

.github/workflows/ci.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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+
16+
concurrency:
17+
group: ci
18+
cancel-in-progress: true
19+
jobs:
20+
macOS_5_4:
21+
name: Test macOS 11 (5.4)
22+
runs-on: macOS-11
23+
env:
24+
DEVELOPER_DIR: /Applications/Xcode_12.5.1.app/Contents/Developer
25+
timeout-minutes: 10
26+
strategy:
27+
matrix:
28+
destination: ['OS=14.5,name=iPhone 12']
29+
steps:
30+
- uses: actions/checkout@v2
31+
# - name: Fetch dependencies
32+
# run: |
33+
# carthage bootstrap --no-use-binaries --platform iOS --cache-builds
34+
# bundle exec pod install
35+
# swift package update
36+
- name: Resolve dependencies
37+
run: swift package resolve
38+
- name: Build
39+
run: swift build --build-tests -Xswiftc "-sdk" -Xswiftc "`xcrun --sdk iphonesimulator --show-sdk-path`" -Xswiftc "-target" -Xswiftc "x86_64-apple-ios13.0-simulator"
40+
- name: Test
41+
run: swift test --skip-build --parallel --list-tests

Package.swift

Lines changed: 11 additions & 5 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"],
@@ -42,6 +41,13 @@ let package = Package(
4241
),
4342
.testTarget(
4443
name: "web3swiftTests",
45-
dependencies: ["web3swift"]),
44+
dependencies: ["web3swift"],
45+
resources: [
46+
.copy("../TestToken/Helpers/SafeMath/SafeMath.sol"),
47+
.copy("../TestToken/Helpers/TokenBasics/ERC20.sol"),
48+
.copy("../TestToken/Helpers/TokenBasics/IERC20.sol"),
49+
.copy("../TestToken/Token/Web3SwiftToken.sol")
50+
]
51+
),
4652
]
4753
)

0 commit comments

Comments
 (0)