Skip to content

Commit 0736298

Browse files
authored
Merge branch 'main' into leif/update-doc-format
2 parents 6accfc8 + 5e9d4ea commit 0736298

File tree

8 files changed

+50
-45
lines changed

8 files changed

+50
-45
lines changed

.github/workflows/ci.yml

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

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- uses: actions/checkout@v4
1717

1818
- name: Select Xcode
19-
run: sudo xcode-select -s /Applications/Xcode_16.0.app/Contents/Developer
19+
run: sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
2020

2121
- name: Build Documentation
2222
run: |

.github/workflows/macOS.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: macOS
2+
3+
on:
4+
push:
5+
branches: ["**"]
6+
7+
jobs:
8+
macOS:
9+
runs-on: macos-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- name: Select Xcode
13+
run: sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
14+
- name: Build
15+
run: swift build -v
16+
- name: Run tests
17+
run: swift test -v

.github/workflows/ubuntu.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: ubuntu
2+
3+
on:
4+
push:
5+
branches: ["**"]
6+
7+
jobs:
8+
ubuntu:
9+
runs-on: ubuntu-latest
10+
container: swift:6.0
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Build
14+
run: swift build -v
15+
- name: Run tests
16+
run: swift test -v

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# swift-algorand
22

3-
[![CI](https://img.shields.io/github/actions/workflow/status/CorvidLabs/swift-algorand/ci.yml?label=CI&branch=main)](https://github.com/CorvidLabs/swift-algorand/actions/workflows/ci.yml)
3+
[![macOS](https://img.shields.io/github/actions/workflow/status/CorvidLabs/swift-algorand/macOS.yml?label=macOS&branch=main)](https://github.com/CorvidLabs/swift-algorand/actions/workflows/macOS.yml)
4+
[![Ubuntu](https://img.shields.io/github/actions/workflow/status/CorvidLabs/swift-algorand/ubuntu.yml?label=Ubuntu&branch=main)](https://github.com/CorvidLabs/swift-algorand/actions/workflows/ubuntu.yml)
45
[![License](https://img.shields.io/github/license/CorvidLabs/swift-algorand)](https://github.com/CorvidLabs/swift-algorand/blob/main/LICENSE)
56
[![Version](https://img.shields.io/github/v/release/CorvidLabs/swift-algorand)](https://github.com/CorvidLabs/swift-algorand/releases)
67

7-
> **Pre-1.0 Notice**: This SDK is under active development. The API may change between minor versions until 1.0. Not yet audited by a third-party security firm.
8+
> **Pre-1.0 Notice**: This SDK is under active development. The API may change between minor versions until 1.0.
89
910
A modern Swift SDK for the Algorand blockchain. Built with Swift 6 and async/await.
1011

Sources/Algorand/AssetTransaction.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,13 @@ public struct AssetCreateTransaction: Transaction {
134134
apar["df"] = .bool(true)
135135
}
136136

137-
if let unitName = assetParams.unitName {
137+
if let unitName = assetParams.unitName, !unitName.isEmpty {
138138
apar["un"] = .string(unitName)
139139
}
140-
if let assetName = assetParams.assetName {
140+
if let assetName = assetParams.assetName, !assetName.isEmpty {
141141
apar["an"] = .string(assetName)
142142
}
143-
if let url = assetParams.url {
143+
if let url = assetParams.url, !url.isEmpty {
144144
apar["au"] = .string(url)
145145
}
146146
if let metadataHash = assetParams.metadataHash {

Tests/AlgorandTests/ComprehensiveIntegrationTest.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ final class ComprehensiveIntegrationTest: XCTestCase {
1111
override func setUp() async throws {
1212
try await super.setUp()
1313

14+
// Skip integration tests on CI - they require Docker and local Algorand node
15+
guard ProcessInfo.processInfo.environment["CI"] == nil else {
16+
throw XCTSkip("Integration tests require local Algorand node - skipping on CI")
17+
}
18+
1419
let network = ProcessInfo.processInfo.environment["ALGORAND_NETWORK"] ?? "localnet"
1520
guard network == "localnet" else {
1621
throw XCTSkip("Comprehensive test only runs on LocalNet")

Tests/AlgorandTests/IntegrationTests.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ final class IntegrationTests: XCTestCase {
1414
override func setUp() async throws {
1515
try await super.setUp()
1616

17+
// Skip integration tests on CI - they require Docker and local Algorand node
18+
guard ProcessInfo.processInfo.environment["CI"] == nil else {
19+
throw XCTSkip("Integration tests require local Algorand node - skipping on CI")
20+
}
21+
1722
let network = ProcessInfo.processInfo.environment["ALGORAND_NETWORK"] ?? "localnet"
1823
isLocalNet = network == "localnet"
1924

0 commit comments

Comments
 (0)