Skip to content

Commit 2a8d3e4

Browse files
authoredJun 20, 2023
Correct RediStack URL and match Vapor's minimum Swift version (#211)
* Correct RediStack URL and match Vapor's min Swift version * Update Exports.swift * Delete .swiftlint.yml
1 parent b4fcda8 commit 2a8d3e4

File tree

7 files changed

+46
-74
lines changed

7 files changed

+46
-74
lines changed
 

‎.github/workflows/projectboard.yml

+4-24
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,7 @@ on:
55
types: [reopened, closed, labeled, unlabeled, assigned, unassigned]
66

77
jobs:
8-
setup_matrix_input:
9-
runs-on: ubuntu-latest
10-
11-
steps:
12-
- id: set-matrix
13-
run: |
14-
output=$(curl ${{ github.event.issue.url }}/labels | jq '.[] | .name') || output=""
15-
16-
echo '======================'
17-
echo 'Process incoming data'
18-
echo '======================'
19-
json=$(echo $output | sed 's/"\s"/","/g')
20-
echo $json
21-
echo "::set-output name=matrix::$(echo $json)"
22-
outputs:
23-
issueTags: ${{ steps.set-matrix.outputs.matrix }}
24-
25-
Manage_project_issues:
26-
needs: setup_matrix_input
27-
uses: vapor/ci/.github/workflows/issues-to-project-board.yml@main
28-
with:
29-
labelsJson: ${{ needs.setup_matrix_input.outputs.issueTags }}
30-
secrets:
31-
PROJECT_BOARD_AUTOMATION_PAT: "${{ secrets.PROJECT_BOARD_AUTOMATION_PAT }}"
8+
update_project_boards:
9+
name: Update project boards
10+
uses: vapor/ci/.github/workflows/update-project-boards-for-issue.yml@reusable-workflows
11+
secrets: inherit

‎.github/workflows/test.yml

+29-31
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
name: test
22
on:
3-
pull_request: { branches: ['*'] }
4-
push: { branches: ['main'] }
5-
3+
pull_request: { types: [opened, reopened, synchronize, ready_for_review] }
4+
push: { branches: [ main ] }
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.ref }}
7+
cancel-in-progress: true
68
env:
7-
LOG_LEVEL: debug
9+
LOG_LEVEL: info
810
SWIFT_DETERMINISTIC_HASHING: 1
911
REDIS_HOSTNAME: redis
1012
REDIS_PORT: 6379
@@ -13,50 +15,46 @@ env:
1315

1416
jobs:
1517
api-breakage:
16-
if: github.event_name == 'pull_request'
18+
if: ${{ !(github.event.pull_request.draft || false) }}
1719
runs-on: ubuntu-latest
18-
container: swift:5.7-jammy
20+
container: swift:5.8-jammy
1921
steps:
20-
- name: Check out package
22+
- name: Check out code
2123
uses: actions/checkout@v3
22-
with:
23-
fetch-depth: 0
24-
# https://github.com/actions/checkout/issues/766
25-
- name: Mark the workspace as safe
26-
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
27-
- name: Check for API breaking changes
28-
run: swift package diagnose-api-breaking-changes origin/main
24+
with: { 'fetch-depth': 0 }
25+
- name: Run API breakage check action
26+
uses: vapor/ci/.github/actions/ci-swift-check-api-breakage@reusable-workflows
2927

3028
linux-unit:
29+
if: ${{ !(github.event.pull_request.draft || false) }}
3130
strategy:
3231
fail-fast: false
3332
matrix:
3433
container:
35-
- swift:5.5-bionic
3634
- swift:5.6-focal
3735
- swift:5.7-jammy
36+
- swift:5.8-jammy
37+
- swiftlang/swift:nightly-5.9-jammy
38+
- swiftlang/swift:nightly-main-jammy
39+
redis:
40+
- redis:6
41+
- redis:7
3842
container: ${{ matrix.container }}
3943
services:
4044
redis:
41-
image: redis:6
45+
image: ${{ matrix.redis }}
4246
redis-2:
43-
image: redis:6
47+
image: ${{ matrix.redis }}
4448
runs-on: ubuntu-latest
4549
steps:
50+
- name: Save Redis version to env
51+
run: |
52+
echo REDIS_VERSION='${{ matrix.redis }}' >> $GITHUB_ENV
4653
- name: Check out package
4754
uses: actions/checkout@v3
4855
- name: Run unit tests with Thread Sanitizer
49-
run: swift test --sanitize=thread
50-
51-
# TODO: Use reusable workflow
52-
53-
test-exports:
54-
name: Test exports
55-
runs-on: ubuntu-latest
56-
steps:
57-
- name: Check out Vapor
58-
uses: actions/checkout@v3
59-
with:
60-
fetch-depth: 0
61-
- name: Build
62-
run: swift build -Xswiftc -DBUILDING_DOCC
56+
run: swift test --sanitize=thread --enable-code-coverage
57+
- name: Upload code coverage
58+
uses: vapor/swift-codecov-action@v0.2
59+
with:
60+
cc_env_vars: 'SWIFT_VERSION,SWIFT_PLATFORM,RUNNER_OS,RUNNER_ARCH,REDIS_VERSION'

‎.swiftlint.yml

-13
This file was deleted.

‎Package.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:5.5.2
1+
// swift-tools-version:5.6
22
import PackageDescription
33

44
let package = Package(
@@ -13,7 +13,7 @@ let package = Package(
1313
.library(name: "Redis", targets: ["Redis"])
1414
],
1515
dependencies: [
16-
.package(url: "https://gitlab.com/swift-server-community/RediStack.git", from: "1.4.1"),
16+
.package(url: "https://github.com/swift-server/RediStack.git", from: "1.4.1"),
1717
.package(url: "https://github.com/vapor/vapor.git", from: "4.50.0"),
1818
],
1919
targets: [

‎README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
<img src="https://github.com/vapor/redis/actions/workflows/test.yml/badge.svg?event=push" alt="CI">
1616
</a>
1717
<a href="https://swift.org">
18-
<img src="http://img.shields.io/badge/swift-5.5-brightgreen.svg" alt="Swift 5.5">
18+
<img src="http://img.shields.io/badge/swift-5.6-brightgreen.svg" alt="Swift 5.6">
1919
</a>
2020

21-
<span>This project is based off the Redis driver <a href="https://gitlab.com/Mordil/RediStack" target="_blank"><bold>RediStack</bold></a>. For the majority of API documentation, refer to <a href="https://docs.redistack.info" target="_blank">docs.redistack.info</a>.</span>
21+
<span>This project is based off the Redis driver <a href="https://github.com/swift-server/RediStack" target="_blank"><bold>RediStack</bold></a>. For the majority of API documentation, refer to <a href="https://swiftpackageindex.com/swift-server/RediStack/documentation" target="_blank">the RediStack documentation homepage</a>.</span>
2222
</p>

‎Sources/Redis/Docs.docc/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ``Redis``
22

3-
Redis is a library to integrate [RediStack](https://gitlab.com/swift-server-community/RediStack) with Vapor. It provides a number of extensions to both make configuring a Vapor application with Redis simple and to provide Redis implementations for Vapor protocols, such as the cache.
3+
Redis is a library to integrate [RediStack](https://github.com/swift-server/RediStack) with Vapor. It provides a number of extensions to both make configuring a Vapor application with Redis simple and to provide Redis implementations for Vapor protocols, such as the cache.
44

55
## Overview
66

‎Sources/Redis/Exports.swift

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
#if !BUILDING_DOCC
1+
#if swift(>=5.8)
2+
3+
@_documentation(visibility: internal) @_exported import RediStack
4+
@_documentation(visibility: internal) @_exported import struct Foundation.URL
5+
@_documentation(visibility: internal) @_exported import struct Logging.Logger
6+
@_documentation(visibility: internal) @_exported import struct NIO.TimeAmount
7+
8+
#else
29

310
@_exported import RediStack
411
@_exported import struct Foundation.URL

0 commit comments

Comments
 (0)
Please sign in to comment.