Skip to content

Commit

Permalink
Correct RediStack URL and match Vapor's minimum Swift version (#211)
Browse files Browse the repository at this point in the history
* Correct RediStack URL and match Vapor's min Swift version
* Update Exports.swift
* Delete .swiftlint.yml
  • Loading branch information
gwynne authored Jun 20, 2023
1 parent b4fcda8 commit 2a8d3e4
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 74 deletions.
28 changes: 4 additions & 24 deletions .github/workflows/projectboard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,7 @@ on:
types: [reopened, closed, labeled, unlabeled, assigned, unassigned]

jobs:
setup_matrix_input:
runs-on: ubuntu-latest

steps:
- id: set-matrix
run: |
output=$(curl ${{ github.event.issue.url }}/labels | jq '.[] | .name') || output=""
echo '======================'
echo 'Process incoming data'
echo '======================'
json=$(echo $output | sed 's/"\s"/","/g')
echo $json
echo "::set-output name=matrix::$(echo $json)"
outputs:
issueTags: ${{ steps.set-matrix.outputs.matrix }}

Manage_project_issues:
needs: setup_matrix_input
uses: vapor/ci/.github/workflows/issues-to-project-board.yml@main
with:
labelsJson: ${{ needs.setup_matrix_input.outputs.issueTags }}
secrets:
PROJECT_BOARD_AUTOMATION_PAT: "${{ secrets.PROJECT_BOARD_AUTOMATION_PAT }}"
update_project_boards:
name: Update project boards
uses: vapor/ci/.github/workflows/update-project-boards-for-issue.yml@reusable-workflows
secrets: inherit
60 changes: 29 additions & 31 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
name: test
on:
pull_request: { branches: ['*'] }
push: { branches: ['main'] }

pull_request: { types: [opened, reopened, synchronize, ready_for_review] }
push: { branches: [ main ] }
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
LOG_LEVEL: debug
LOG_LEVEL: info
SWIFT_DETERMINISTIC_HASHING: 1
REDIS_HOSTNAME: redis
REDIS_PORT: 6379
Expand All @@ -13,50 +15,46 @@ env:

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

linux-unit:
if: ${{ !(github.event.pull_request.draft || false) }}
strategy:
fail-fast: false
matrix:
container:
- swift:5.5-bionic
- swift:5.6-focal
- swift:5.7-jammy
- swift:5.8-jammy
- swiftlang/swift:nightly-5.9-jammy
- swiftlang/swift:nightly-main-jammy
redis:
- redis:6
- redis:7
container: ${{ matrix.container }}
services:
redis:
image: redis:6
image: ${{ matrix.redis }}
redis-2:
image: redis:6
image: ${{ matrix.redis }}
runs-on: ubuntu-latest
steps:
- name: Save Redis version to env
run: |
echo REDIS_VERSION='${{ matrix.redis }}' >> $GITHUB_ENV
- name: Check out package
uses: actions/checkout@v3
- name: Run unit tests with Thread Sanitizer
run: swift test --sanitize=thread

# TODO: Use reusable workflow

test-exports:
name: Test exports
runs-on: ubuntu-latest
steps:
- name: Check out Vapor
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build
run: swift build -Xswiftc -DBUILDING_DOCC
run: swift test --sanitize=thread --enable-code-coverage
- name: Upload code coverage
uses: vapor/swift-codecov-action@v0.2
with:
cc_env_vars: 'SWIFT_VERSION,SWIFT_PLATFORM,RUNNER_OS,RUNNER_ARCH,REDIS_VERSION'
13 changes: 0 additions & 13 deletions .swiftlint.yml

This file was deleted.

4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.5.2
// swift-tools-version:5.6
import PackageDescription

let package = Package(
Expand All @@ -13,7 +13,7 @@ let package = Package(
.library(name: "Redis", targets: ["Redis"])
],
dependencies: [
.package(url: "https://gitlab.com/swift-server-community/RediStack.git", from: "1.4.1"),
.package(url: "https://github.com/swift-server/RediStack.git", from: "1.4.1"),
.package(url: "https://github.com/vapor/vapor.git", from: "4.50.0"),
],
targets: [
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
<img src="https://github.com/vapor/redis/actions/workflows/test.yml/badge.svg?event=push" alt="CI">
</a>
<a href="https://swift.org">
<img src="http://img.shields.io/badge/swift-5.5-brightgreen.svg" alt="Swift 5.5">
<img src="http://img.shields.io/badge/swift-5.6-brightgreen.svg" alt="Swift 5.6">
</a>

<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>
<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>
</p>
2 changes: 1 addition & 1 deletion Sources/Redis/Docs.docc/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ``Redis``

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.
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.

## Overview

Expand Down
9 changes: 8 additions & 1 deletion Sources/Redis/Exports.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
#if !BUILDING_DOCC
#if swift(>=5.8)

@_documentation(visibility: internal) @_exported import RediStack
@_documentation(visibility: internal) @_exported import struct Foundation.URL
@_documentation(visibility: internal) @_exported import struct Logging.Logger
@_documentation(visibility: internal) @_exported import struct NIO.TimeAmount

#else

@_exported import RediStack
@_exported import struct Foundation.URL
Expand Down

0 comments on commit 2a8d3e4

Please sign in to comment.