Skip to content

Commit 7d0a0b8

Browse files
committed
try to install redis
1 parent eb5aa28 commit 7d0a0b8

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

.github/workflows/pull_request.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ jobs:
1515
name: Unit tests
1616
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main
1717
with:
18-
# since we don't have systemctl, we run the redis server manually in the background
19-
linux_pre_build_command: apt-get update -y && apt-get install redis -y && redis-server &
2018
linux_exclude_swift_versions: "[{\"swift_version\": \"5.8\"}]"
19+
# since we don't have systemctl, we run the redis server manually in the background
20+
linux_pre_build_command: apt-get update -y && apt-get install redis
2121
linux_env_vars: REDIS_URL=redis
22+
linux_build_command: bash -c 'redis-server &; swift test'
2223
enable_windows_checks: false

Tests/RediStackIntegrationTests/Commands/SortedSetCommandsTests.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ final class SortedSetCommandsTests: RediStackIntegrationTestCase {
328328
XCTAssertEqual(elements.count, 6)
329329

330330
let values = try RedisConnection._mapSortedSetResponse(elements, scoreIsFirst: false)
331-
.map { (value, _) in return Int(fromRESP: value) }
331+
.map { (value, _) in Int(fromRESP: value) }
332332

333333
XCTAssertEqual(values[0], 9)
334334
XCTAssertEqual(values[1], 8)
@@ -352,7 +352,7 @@ final class SortedSetCommandsTests: RediStackIntegrationTestCase {
352352
XCTAssertEqual(elements.count, 6)
353353

354354
let values = try RedisConnection._mapSortedSetResponse(elements, scoreIsFirst: false)
355-
.map { (_, score) in return score }
355+
.map { (_, score) in score }
356356

357357
XCTAssertEqual(values[0], 1.0)
358358
XCTAssertEqual(values[1], 2.0)
@@ -376,7 +376,7 @@ final class SortedSetCommandsTests: RediStackIntegrationTestCase {
376376
XCTAssertEqual(elements.count, 6)
377377

378378
let values = try RedisConnection._mapSortedSetResponse(elements, scoreIsFirst: false)
379-
.map { (_, score) in return score }
379+
.map { (_, score) in score }
380380

381381
XCTAssertEqual(values[0], 3.0)
382382
XCTAssertEqual(values[1], 2.0)

Tests/RediStackTests/ChannelHandlers/RedisByteDecoderTests.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ extension RedisByteDecoderTests {
155155

156156
var arraysMatch = true
157157

158-
left.enumerated().forEach {
159-
let (offset, decodedElement) = $0
158+
for item in left.enumerated() {
159+
let (offset, decodedElement) = item
160160

161161
switch (decodedElement, right[offset]) {
162162
case (let .bulkString(decoded), let .bulkString(expected)): arraysMatch = decoded == expected

0 commit comments

Comments
 (0)