-
-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add 5.9 manifest with strict concurrency * Add async lifecycle handler function * Fix a ton of Sendable warnings * Rework RedisStorage * Silence some warnings * Fix Sendable warnings * Update CI * Fine * Modernize/fix CI * Disable CodeQL for now --------- Co-authored-by: Gwynne Raskind <[email protected]>
- Loading branch information
Showing
11 changed files
with
163 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,4 @@ jobs: | |
with: | ||
package_name: redis | ||
modules: Redis | ||
pathsToInvalidate: /redis | ||
pathsToInvalidate: /redis/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,24 +17,47 @@ jobs: | |
api-breakage: | ||
if: ${{ !(github.event.pull_request.draft || false) }} | ||
runs-on: ubuntu-latest | ||
container: swift:5.8-jammy | ||
container: swift:jammy | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
with: { 'fetch-depth': 0 } | ||
- name: Run API breakage check action | ||
uses: vapor/ci/.github/actions/ci-swift-check-api-breakage@reusable-workflows | ||
- name: Run API breakage check | ||
run: | | ||
git config --global --add safe.directory "${GITHUB_WORKSPACE}" | ||
swift package diagnose-api-breaking-changes origin/main | ||
# gh-codeql: | ||
# if: ${{ !(github.event.pull_request.draft || false) }} | ||
# runs-on: ubuntu-latest | ||
# permissions: { actions: write, contents: read, security-events: write } | ||
# timeout-minutes: 30 | ||
# steps: | ||
# - name: Install latest Swift toolchain | ||
# uses: vapor/[email protected] | ||
# with: { toolchain: latest } | ||
# - name: Check out code | ||
# uses: actions/checkout@v4 | ||
# - name: Fix Git configuration | ||
# run: 'git config --global --add safe.directory "${GITHUB_WORKSPACE}"' | ||
# - name: Initialize CodeQL | ||
# uses: github/codeql-action/init@v3 | ||
# with: { languages: swift } | ||
# - name: Perform build | ||
# run: swift build | ||
# - name: Run CodeQL analyze | ||
# uses: github/codeql-action/analyze@v3 | ||
|
||
linux-unit: | ||
if: ${{ !(github.event.pull_request.draft || false) }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
container: | ||
- swift:5.6-focal | ||
- swift:5.7-jammy | ||
- swift:5.8-jammy | ||
- swiftlang/swift:nightly-5.9-jammy | ||
- swift:5.8-focal | ||
- swift:5.9-jammy | ||
- swift:5.10-jammy | ||
- swiftlang/swift:nightly-6.0-jammy | ||
- swiftlang/swift:nightly-main-jammy | ||
redis: | ||
- redis:6 | ||
|
@@ -47,22 +70,11 @@ jobs: | |
redis-2: | ||
image: ${{ matrix.redis }} | ||
steps: | ||
- name: Save Redis version to env | ||
run: | | ||
echo REDIS_VERSION='${{ matrix.redis }}' >> $GITHUB_ENV | ||
- name: Display versions | ||
shell: bash | ||
run: | | ||
if [[ '${{ contains(matrix.container, 'nightly') }}' == 'true' ]]; then | ||
SWIFT_PLATFORM="$(source /etc/os-release && echo "${ID}${VERSION_ID}")" SWIFT_VERSION="$(cat /.swift_tag)" | ||
printf 'SWIFT_PLATFORM=%s\nSWIFT_VERSION=%s\n' "${SWIFT_PLATFORM}" "${SWIFT_VERSION}" >>"${GITHUB_ENV}" | ||
fi | ||
printf 'OS: %s\nTag: %s\nVersion:\n' "${SWIFT_PLATFORM}-${RUNNER_ARCH}" "${SWIFT_VERSION}" && swift --version | ||
- name: Check out package | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
- name: Run unit tests with Thread Sanitizer and coverage | ||
run: swift test --sanitize=thread --enable-code-coverage | ||
- name: Submit coverage report to Codecov.io | ||
uses: vapor/swift-codecov-action@v0.2 | ||
- name: Upload coverage data | ||
uses: vapor/swift-codecov-action@v0.3 | ||
with: | ||
cc_env_vars: 'SWIFT_VERSION,SWIFT_PLATFORM,RUNNER_OS,RUNNER_ARCH,REDIS_VERSION' | ||
codecov_token: ${{ secrets.CODECOV_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// swift-tools-version:5.9 | ||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "redis", | ||
platforms: [ | ||
.macOS(.v10_15), | ||
.iOS(.v13), | ||
.tvOS(.v13), | ||
.watchOS(.v6), | ||
], | ||
products: [ | ||
.library(name: "Redis", targets: ["Redis"]) | ||
], | ||
dependencies: [ | ||
.package(url: "https://github.com/swift-server/RediStack.git", from: "1.4.1"), | ||
.package(url: "https://github.com/vapor/vapor.git", from: "4.100.0"), | ||
], | ||
targets: [ | ||
.target( | ||
name: "Redis", | ||
dependencies: [ | ||
.product(name: "RediStack", package: "RediStack"), | ||
.product(name: "Vapor", package: "vapor"), | ||
], | ||
swiftSettings: [.enableExperimentalFeature("StrictConcurrency=complete")] | ||
), | ||
.testTarget( | ||
name: "RedisTests", | ||
dependencies: [ | ||
.target(name: "Redis"), | ||
.product(name: "XCTVapor", package: "vapor"), | ||
], | ||
swiftSettings: [.enableExperimentalFeature("StrictConcurrency=complete")] | ||
) | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.